Questions tagged [specs]

The specs is a software's design and the features specification, you can through it to know the software's specifications. General, the open source code will have specs.

If you want to become a contributor for open source lib, through specs you can know how to design the lib, you can write standard code for it.

108 questions
62
votes
8 answers

Templates of Technical and Functional Specs

I am looking for good templates for writing both technical and functional specs on a project or work request. What do you use? How deep do you get while writing the specs? What general tips should I be aware of? My company needs these badly.…
Mike Fielden
  • 10,055
  • 14
  • 59
  • 99
34
votes
2 answers

Using the "should NOT produce [exception]" syntax in ScalaTest

I'am toying with Specs2 and ScalaTest for BDD in Scala. I've written expectations in Specs2 when I am asserting that a given exception should not be thrown. "do something" in { { .... } must not(throwA[MyException]) } I was hoping to be able…
Guillaume Belrose
  • 2,478
  • 4
  • 23
  • 24
21
votes
2 answers

Scala testing: What's the status and relationship of SUnit, ScalaTest, ScalaCheck, Specs and ParTest?

Scala provides a choice of different testing frameworks, but I wonder if there are differences in the maturity and stability they have and which distinct features they provide. Is there a specific one which should fit for all kinds of…
soc
  • 27,983
  • 20
  • 111
  • 215
18
votes
4 answers

Mocking scala object

I am using mockito and trying to mock a scala object. object Sample { } //test class SomeTest extends Specification with ScalaTest with Mockito { "mocking should succeed" in { val mockedSample = mock[Sample] } } This gives me two…
scout
  • 2,336
  • 4
  • 21
  • 22
14
votes
1 answer

How to get card specs programmatically in CUDA

I'm just starting out with CUDA. Is there a way of getting the card specs programmatically?
cookM
  • 953
  • 3
  • 8
  • 11
11
votes
1 answer

Guide to writing specs in Erlang

In open source projects I see the following two ways of writing specs: Specs in comments @spec start_link() -> {ok, pid()} Specs in source code -spec start_link() -> {ok, pid()} What's the difference? Is one preferred over the other?
mbsheikh
  • 2,501
  • 5
  • 23
  • 33
11
votes
4 answers

Exception matcher in Specs BDD library for Scala

Im using the Specs BDD library for writing Scala unit tests (http://code.google.com/p/specs) .In my code if i want to assert that a throws an exception of type ClassNotFoundException, then i can write the following code: a must…
Joe
  • 111
  • 1
  • 3
11
votes
3 answers

learn Scala with TDD

I'm learning Scala now. I saw there are 2 test frameworks there, ScalaTest and Specs. My only problem is that I'm not still at ease with the language to decide which is better. Also I'm used to write tests before code, at the moment I have no clear…
Uberto
  • 2,712
  • 3
  • 25
  • 27
10
votes
2 answers

How to use Specs2 with Scalacheck to automate testing of String arguments?

The rewritten specs2 testing framework for Scala integrates automated testing with scalacheck. The examples given in the specs2 documentation on how to use scalacheck together with specs2 either use integers or more complicated custom generators as…
Steffen
  • 8,033
  • 1
  • 28
  • 34
9
votes
3 answers

Akka actors unit testing with Scala

I'm fairly new to Scala so please be gentle. In the app I'm currently building, I'm using Akka actors and I want to write some unit tests. I came across this official documentation for writing unit tests for Akka actors but I couldn't understand…
lloydmeta
  • 1,289
  • 1
  • 15
  • 25
8
votes
1 answer

Creating a Specs2 matcher in a modular way

I have functions A => Double. I want to check whether two such functions give the same results (up to a tolerance, using the existing beCloseTo matcher) for a given set of values. I want to be able to write: type TF = A => Double (f: TF) must…
ziggystar
  • 28,410
  • 9
  • 72
  • 124
8
votes
2 answers

Is there a specs matcher that will unbox Option and Either

I've created a specs test, to validate some JSON parsing. Although the test works perfecly well, it feels rather noisy. I wonder if there is existing code in Specifications to unbox Option and Either? "twitter json to Scala class mapper" should { …
Bryan Hunt
  • 3,685
  • 2
  • 24
  • 36
7
votes
1 answer

Is there a way to match on a call-by-name argument of a Mockito mock object in Specs?

I am testing the interaction between one object, and another object with some methods that have call-by-name arguments. However, I can't figure out how to create an argument matcher for that call-by-name argument. Let's say that this is the…
Wilfred Springer
  • 10,869
  • 4
  • 55
  • 69
7
votes
5 answers

What specs does one need for a good iPhone app development environment?

I'm going to buy a new mac to develop iPhone apps (previously been programming them at work on their iMac). What do you think the minimum and recommended specs are? Is 2 GB of RAM plenty for XCode, interface builder and the simulator to all run…
WoodenKitty
  • 6,521
  • 8
  • 53
  • 73
7
votes
1 answer

How does the "specs" BDD framework for Scala work?

I'm just getting started with Scala, and I'm wondering which language feature allows you to do this: "PersistentQueue" should { "add and remove one item" in { withTempFolder { val q = new PersistentQueue(folderName, "work",…
Simon Willison
  • 15,642
  • 5
  • 36
  • 44
1
2 3 4 5 6 7 8