implicit.ly

Scala software, hot off the presses

specs2 1.10

This version adds new features on top of 1.9:

  • added a skipAllUnless(condition) to skip examples unless a condition is verified
  • added a CommandLineArguments trait to access the command-line arguments and use them to build the specification or to specialize the examples behaviour
  • added a notoc argument to avoid generating a table of contents
  • added the possibility to add a css/specs2-user.css file to customize the display of the html documentation
  • a specification can be included in another one so that it will be executed at the same time but not displayed: include(childSpec.hide)
  • added the possibility to change the directory where the html documentation is generated: class S extends Specification { def is = "Guide".title.baseDirIs("guide") ^ end }
  • improved the error message when there is an Error thrown from an Example (see this StackOverflow question)

And some fixes:

  • issue 72: fixed a NullPointerException when receiving an AssertionError with a null message
  • issue 78: show the exception stacktrace when thrown from a ScalaCheck property

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

via herald

Filed under  //   specs2  

specs2 1.9

This version adds new features on top of 1.8.2:

  • isolated specifications where each example is executed in its own copy of the specification so that all local variables are re-initialized (an example here)
  • improved the documentation showing that DataTables can be displayed as examples
  • improved the performance of the beMatching matchers by compiling the regex only once
  • added an AllExpectations trait to collect all the expectations of an example instead of stopping after the first failure
  • Mockito can now be used with methods having by-name arguments or implicitly converted arguments
  • added some helper functions and conversions to verify function/partial function parameters with Mockito. Note: the specs2 jar needs to be placed before the Mockito jar on the classpath
  • a Notifier/Exporter can now be specified as an argument for custom reporting of the specification
  • mutable specifications can now be used as acceptance specifications with: paragraphs and formatting fragments, auto-examples, given/when/then style
  • reworked the User Guide titles for better readability and structure
  • the exact type of an exception happening during the execution of an example is now kept for better reporting
  • ScalaCheck properties can now be used inside contexts in a mutable specification
  • added haveKeys and haveValues matchers for Maps
  • added a showAs method to totally control how values are displayed in failure messages. This is especially useful for filtering and displaying large collections or maps: longList.showAs(_.filter(_.startsWith("hi")).mkString("\n")) must have size(100)
  • added a stopOnSkip argument to stop the execution of a specification after the first skipped value
  • added a skipAllIf(condition) argument to skip all the examples if a condition is verified
  • added a checkUrl argument to check that urls in the produced html files are indeed accessible
  • added a confliciting implicit with a method name explaining what is happening if an operator is forgotten for an Example. When trying to compile: "this example won't work" { ko }, the compiler will raise an implicit conflict error with including this message ***If you see this message this means that you've forgotten an operator after the description string: you should write "example" >> result ***

And some fixes:

  • fixed issue 61: proper timing of specifications when examples are executed concurrently
  • fixed issue 63: improper inference for ParserMatchers
  • fixed issue 64: display of the >> operator in the User Guide
  • fixed issue 65: result of and-ed DataTables
  • fixed issue 69: use of aka in matcher adaptation
  • fixed issue 70: used a threadsafe JSON parser for JSON matchers

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

Filed under  //   Scala 2.10.0-M2   Scala 2.9.1-1   Scala 2.9.2-RC2   org.specs2   specs2  

specs2 1.8.2

This version adds some performance improvements on top of 1.8.1:

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

Filed under  //   Scala 2.9.0   Scala 2.9.0-1   org.specs2   specs2  

specs2 1.8.1

This version fixes 2 issues on top of 1.8:

  • fixed issue 60: contention when examples are executed concurrently. This should speed-up the specification execution significantly.
  • coloring of text with skipped examples having a multi-line description

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

Filed under  //   Scala 2.9.0   Scala 2.9.0-1   org.specs2   specs2  

specs2 1.8

This version adds new features on top of 1.7.1:

  • added an Analysis trait to specify dependencies between packages (using the classycle project)
  • added traits to selectively remove implicits: NoMustExpectations, NoShouldExpectations, NoBooleanAutoExamples, NoArgProperties, NoDebug, NoPendingUntilFixed, NoContexts
  • DataTables can now be used as an example without giving a description. The DataTable itself will be used as the example description
  • contain matchers can now be adapted to allow a more flexible definition of "containment"
  • reworked the Matchers guide with tabs to get an easier access to all the matchers documentation
  • upgraded to Mockito 1.9.0 (inline stubbing + verification ignoring stubbed methods)
  • added the \> and \>~ xml matchers to match Text nodes (aliases: textIs, textMatches)
  • issue 55: added system exit codes on the ClassRunner main method

And some fixes:

  • fixed the creation of the table of contents when there are linked specifications
  • fixed issue 51: specify a partial match for ParserMatchers
  • fixed issue 52: added a there was no(mock).interaction expression (corresponding to Mockito's verifyZeroInteractions)
  • fixed issue 54: reporting the data frequencies when using ScalaCheck
  • fixed issue 57: correct location on ScalaCheck failures

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

Filed under  //   Scala 2.9.0   Scala 2.9.0-1   org.specs2   specs2  

specs2 1.7.1

This version fixes an important issue from 1.7:

  • following the change in 1.7 which allowed results to be displayed as soon as computed on the console, there was no more guarantee that steps would execute stricly after the preceding group of examples

There are a few improvements:

  • the org.specs2.time.Duration class is made public to get a better control over time implicits
  • there is a new beSorted matcher for sequences
  • [experimental] new Analysis trait to specify expected dependencies between the project packages

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

Filed under  //   Scala 2.9.0   org.specs2   specs2  

specs2 1.7

This version adds new features on top of 1.6.1:

  • Mockito settings (name, defaultAnswer, extraInterfaces) can be specified during mock creation
  • issue #39: results are now printed to the console as soon as executed
  • added an implicit function to allow the use of generators in ScalaCheck properties: forAll(generator) { p => p must matchSomething }
  • added forall/foreach/atLeastOnce to check a function returning a Result several times: ((i: Int) => i must be_<=(2)).forall(Seq(1, 2, 3, 4)) or forall(Seq((1, 2), (3, 4))) { case (a, b) => a must be_<(b) } }
  • added TerminationMatchers to check if that a block of code terminates within a reasonable amount of time
  • added containAllOf/containAnyOf collection matchers taking sequences as parameters (instead of varargs)
  • added new matchers to allow Parser matchers to partially consume their input: beAPartialSuccess (issue #46)

And fixes some issues:

  • delayed a MatchResult evaluation when transforming it to a Prop avoid issues with properties implication
  • display of Arrays in failures like Array(1, 2) === Array(1, 3)
  • issue #40: incorrect line number for a failure in a mutable specification
  • issue #41: missing specification title when using sbt
  • issue #45: fixed the evaluation of result1 and result2 so that result2 doesn't get evaluated if result1 succeeds
  • issue #46: fixed the parser matchers which should consume all input
  • issue #47: proper display of DataTables in the console
  • fixed the find.withGroups matcher (was not matching several groups)

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

specs2 1.6.1

Fixed issue 37: broken Pending icon in html reports

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

specs2 1.6

This version adds new features on top of 1.5. The first set of features rely on the storage of execution results for each run (in the specs2-report/stats directory by default):

  • executing an index page with see links referencing other specifications now displays their status correctly
  • it is possible to execute only previously failed/error examples with the wasIssue argument
  • it is possible to display only pending, or skipped examples with a status flag. For example show("!o") will only show errors and skipped examples
  • reports now show the differences with the previous execution: 3 examples, 1 failure (-1), 1 error (+1)
  • storing results can be completely deactivated with the neverStore argument
  • the arguments api has evolved a bit because the number of arguments exceeds the maximum number of function parameters (see the Runners guide for the complete description of the Arguments api and new arguments)

The other features are:

  • html reports with issues have a link to display only the failed examples
  • DataTables are now contravariant
  • an exception is thrown if a null matcher is passed to an expectable
  • new ThrownMessages trait for generic integration with other libraries
  • new haveInterface matcher
  • new mutable BeforeAfter trait (was missing,...)

And some fixes:

  • fixed the issue with -Dcolor=false not being recognized
  • reworked the Given/When/Then specifications indentation so that formatting fragments can now be used to adjust the display
  • fixed a typechecking issue with Mockito specifications
  • fixed auto-examples when no 'end' fragment is used at the end of the specification
  • fixed issue 30: IndexOutOfBoundsException with auto-examples

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

specs2 1.5

This version adds new features on top of 1.4:

  • datatables are now formatted as html tables when using the HtmlRunner (issue 22)
  • added some implicit conversions to allow a better reuse of Given/When/Then steps with variant types
  • added a specs2.whitebg property to specify a white background and get a better color scheme in the console
  • using the DelayedInit trait to allow the proper use of mutable.Before/After traits in mutable specifications
  • Auto-examples can now span several lines

And some fixes:

  • fixed issue 20: reflection error when using maven/surefire
  • added back the possibility to use the example description in the example body
  • fixed issue 23: specification of system properties
  • fixed a missing quote in the documentation messing up the layout
  • fixed a time formatting issue when > 1 hour in the statistics
  • changed the API so that org.specs2.reporter.Colors and org.specs2.reporter.ConsoleColors switch names for better abstraction
  • fixed issue 24: html resources not found
  • fixed the output of html files to use utf-8
  • fixed issue 26: newlines in descriptions are causing display issues with Eclipse

==========================

specs2 is a library for writing software specifications in Scala.

For more information visit: http://specs2.org.

Filed under  //   Scala 2.9.0-1   org.specs2   specs2