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
3
votes
1 answer

Using Specs with unitils

I am trying to get scala specs and unitils-dbunit to work. To use unitils you have to annotate your test class with @RunWith(classOf[UnitilsJUnit4TestClassRunner]) or extend from a class and you can set DataSet's to load…
Christian
  • 4,543
  • 1
  • 22
  • 31
3
votes
6 answers

Approaches to testing that a method is not available on a type

Given a type hierarchy for a game which strongly distinguishes whose turn is next: trait Game trait BlackToPlay extends Game { def move(p: BlackPiece, s: Square): Either[FinishedGame, WhiteToPlay] } trait WhiteToPlay extends Game { def move(p:…
Synesso
  • 37,610
  • 35
  • 136
  • 207
3
votes
1 answer

How to get pretty output from specs+scalacheck with maven?

When I run Specs + Scalacheck tests with IDEA, I get nice pretty output: Specification "CoreSpec" The core grammar should + parse any encoded string + fail to parse an empty encoded string + parse an expected empty string +…
3
votes
1 answer

Case for having xmlhttprequest available in sync

One could simply encapsulate number of synchronous requests as an asynchronous request. The "func" parameter within the below code could for example contain multiple synchronous requests in order. This should give you more power over data…
3
votes
1 answer

How can I detect my computer specs and show it in the browser?

Is it possible to detect the computer specifications from the browser? For example to list the CPU, RAM, video hardware, etc in the browser that I'm using. I've heard that this is impossible do in PHP because it is a server-side language, but I…
Juan Castillo
  • 103
  • 2
  • 9
3
votes
2 answers

How to compose a Matcher[Iterable[A]] from a Matcher[A] with specs testing framework

If I have a Matcher[A] how do create a Matcher[Iterable[A]] that is satisfied only if each element of the Iterable satisfies the original Matcher. class ExampleSpec extends Specification { def allSatisfy[A](m: => Matcher[A]): Matcher[Iterable[A]]…
Garrett Rowe
  • 1,205
  • 9
  • 13
3
votes
1 answer

Visit pages using PhantomJS directly when writing specs with TeaSpoon - Jasmine

I'm trying to write a Javascript spec for my Rails 3.2 application using Teaspoon (the Jasmine version). I'm trying to write a spec that does something like this describe("Fun", function() { var page = require('webpage').create() //ERROR …
Ingo
  • 802
  • 9
  • 21
3
votes
2 answers

Getting failure detail on failed scala/maven/specs tests

I am playing a bit with scala, using maven and scala plugin. I can't find a way to have mvn test report failure details - in particular, whenever some function returns wrong reply, I am getting information about the failure, but I have no way to…
Mekk
  • 1,441
  • 10
  • 12
2
votes
2 answers

Scala spec unit tests

I ve got the following class and I want to write some Spec test cases, but I am really new to it and I don't know how to start. My class do loke like this: class Board{ val array = Array.fill(7)(Array.fill(6)(None:Option[Coin])) def…
user1137701
  • 101
  • 3
2
votes
1 answer

How to mock router in angular jasmine spec

I am new to writing test specs using jasmine. I have a condition in ngOnInit() something like, router.url.includes(some string). The default spec test case which checks component to be truthy is getting failed saying TypeError: Cannot find includes…
2
votes
1 answer

Protractor: Chrome failed to start - exited abnormally

When i run my spec, it starts up Chrome and instantly opens another tab to the Chrome Settings page. Totally clueless as to what is going on. Here is the error message: [11:38:54] I/direct - Using ChromeDriver directly... [11:38:54] I/launcher -…
2
votes
1 answer

Using specs matchers in scalacheck properties

I'm trying to use specs mathers inside scalacheck properties. For example, I have a matcher that works like this: x must matchMyMatcher(y) When I want to use this matcher inside scalacheck property, I do the following: import…
Jeriho
  • 7,129
  • 9
  • 41
  • 57
2
votes
1 answer

CircleCI: comma separated files for parallel tests

It's very easy to setup parallel tests for rspec or cucumber on CircleCI: test: override: - bundle exec rspec: parallel: true files: - spec/unit/sample.rb # can be a direct path to file - spec/**/*.rb …
ciembor
  • 7,189
  • 13
  • 59
  • 100
2
votes
1 answer

Specs for all android phones

Is there a central place where I can find the specs for the majority of the Android phones available on the market? I want to create avds for each of them.
Catalin Morosan
  • 7,897
  • 11
  • 53
  • 73
2
votes
4 answers

How to write a spec that is productive?

I've seen different program managers write specs in different format. Almost every one has had his/her own style of writing a spec. On one hand are those wordy documents which given to a programmer are likely to cause him/her missing a few things. I…
Krantz
  • 6,143
  • 3
  • 25
  • 18