- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
[ANN] specs 1.6.0
Tue, 2009-09-08, 16:47
Hi all,
I am pleased to announce the latest release of the specs library
(http://code.google.com/p/specs).
specs is a library for Behavior-Driven-Development and the latest features
are:
* a new execution model where local variables shared by different examples
are automatically "cleaned-up" without having to use before/after
declaration:
class ThisSpec extends Specification {
"this system" should {
var x = 0
"have one example using a variable" in {
x += 1
x must_== 1
}
"have another example reusing the same variable" in {
x must_== 0 // the side-effect from the previous example is not
affecting this one
}
}
}
* in this release, examples and sub-examples have also been refactored so
that sub-examples can be arbitrarily nested. This is particularly useful
when you want to specify sub-examples sharing a common context but
specializing it with more specific data:
class CustomerSpec extends Specification {
"a customer" should {
var c = customer // general context
"have an empty name by default" in {
c.name must be empty
}
"have a mobile phone" in {
c.phone = Some(mobile) // specific context for a customer with a
mobile phone
"the mobile phone owner is the customer" in {
c.phone.owner must be(c)
}
}
}
}
* an EasyMock trait to complete the trilogy of Java mocking libraries (the
other 2 are JMock and Mockito) accessible from specs
Please post your comments, feedback, suggestions on the specs-users google
group.
Thanks,
Eric.
Tue, 2009-09-08, 22:07
#2
Re: [ANN] specs 1.6.0
Hi Bill,
Yes this is Josh Cough's work on Conductor (and I derived my integration
from the Conductor found in ScalaTest, leaving the licence headers
mentioning the origin of the files. I hope that's ok with you?). As
mentioned on his blog, he proposed me to include that code in specs too and
he was kind enough to drive me through the code in a Skype session.
However I haven't publicized this in the announcement because I know at
least a small issue in my integration and I would like to test this part
better.
Eric.
Bill Venners-3 wrote:
>
> Hi Eric,
>
> I noticed you included Conductor in this release:
>
> http://code.google.com/p/specs/wiki/ThreadsSpecification
>
> Did you get that from ScalaTest?
>
> Bill
>
> On Tue, Sep 8, 2009 at 8:45 AM, Eric Torreborre
> wrote:
>>
>> Hi all,
>>
>> I am pleased to announce the latest release of the specs library
>> (http://code.google.com/p/specs).
>>
>> specs is a library for Behavior-Driven-Development and the latest
>> features
>> are:
>>
>> * a new execution model where local variables shared by different
>> examples
>> are automatically "cleaned-up" without having to use before/after
>> declaration:
>>
>> class ThisSpec extends Specification {
>> "this system" should {
>> var x = 0
>> "have one example using a variable" in {
>> x += 1
>> x must_== 1
>> }
>> "have another example reusing the same variable" in {
>> x must_== 0 // the side-effect from the previous example is not
>> affecting this one
>> }
>> }
>> }
>>
>> * in this release, examples and sub-examples have also been refactored
>> so
>> that sub-examples can be arbitrarily nested. This is particularly useful
>> when you want to specify sub-examples sharing a common context but
>> specializing it with more specific data:
>>
>> class CustomerSpec extends Specification {
>> "a customer" should {
>> var c = customer // general context
>> "have an empty name by default" in {
>> c.name must be empty
>> }
>> "have a mobile phone" in {
>> c.phone = Some(mobile) // specific context for a customer with a
>> mobile phone
>> "the mobile phone owner is the customer" in {
>> c.phone.owner must be(c)
>> }
>> }
>> }
>> }
>>
>> * an EasyMock trait to complete the trilogy of Java mocking libraries
>> (the
>> other 2 are JMock and Mockito) accessible from specs
>>
>> Please post your comments, feedback, suggestions on the specs-users
>> google
>> group.
>>
>> Thanks,
>>
>> Eric.
>> --
>> View this message in context:
>> http://www.nabble.com/-ANN--specs-1.6.0-tp25348796p25348796.html
>> Sent from the Scala mailing list archive at Nabble.com.
>>
>>
>
>
>
Tue, 2009-09-08, 22:17
#3
Re: [ANN] specs 1.6.0
Looking at the POM in your subversion trunk, I notice you're still targetting scala 2.7.4 (at least, for the maven release)
Can I ask if you're going to be releasing a version against scala 2.7.5 for Maven/Ivy/SBT users?
On Tue, Sep 8, 2009 at 4:45 PM, Eric Torreborre <etorreborre@yahoo.com> wrote:
Can I ask if you're going to be releasing a version against scala 2.7.5 for Maven/Ivy/SBT users?
On Tue, Sep 8, 2009 at 4:45 PM, Eric Torreborre <etorreborre@yahoo.com> wrote:
Hi all,
I am pleased to announce the latest release of the specs library
(http://code.google.com/p/specs).
specs is a library for Behavior-Driven-Development and the latest features
are:
* a new execution model where local variables shared by different examples
are automatically "cleaned-up" without having to use before/after
declaration:
class ThisSpec extends Specification {
"this system" should {
var x = 0
"have one example using a variable" in {
x += 1
x must_== 1
}
"have another example reusing the same variable" in {
x must_== 0 // the side-effect from the previous example is not
affecting this one
}
}
}
* in this release, examples and sub-examples have also been refactored so
that sub-examples can be arbitrarily nested. This is particularly useful
when you want to specify sub-examples sharing a common context but
specializing it with more specific data:
class CustomerSpec extends Specification {
"a customer" should {
var c = customer // general context
"have an empty name by default" in {
c.name must be empty
}
"have a mobile phone" in {
c.phone = Some(mobile) // specific context for a customer with a
mobile phone
"the mobile phone owner is the customer" in {
c.phone.owner must be(c)
}
}
}
}
* an EasyMock trait to complete the trilogy of Java mocking libraries (the
other 2 are JMock and Mockito) accessible from specs
Please post your comments, feedback, suggestions on the specs-users google
group.
Thanks,
Eric.
--
View this message in context: http://www.nabble.com/-ANN--specs-1.6.0-tp25348796p25348796.html
Sent from the Scala mailing list archive at Nabble.com.
Tue, 2009-09-08, 22:27
#4
Re: [ANN] specs 1.6.0
On Tuesday 08 September 2009 17:02, Kevin Wright wrote:
> Looking at the POM in your subversion trunk, I notice you're still
> targetting scala 2.7.4 (at least, for the maven release)
> Can I ask if you're going to be releasing a version against scala 2.7.5 for
> Maven/Ivy/SBT users?
I be surprised if there were issues using specs (compiled against 2.7.4) with
2.7.5. If you are referring to issues using it with sbt, I have to update
sbt to work with specs 1.6.0 since some things changed.
Thanks,
Mark
Tue, 2009-09-08, 22:57
#5
Re: [ANN] specs 1.6.0
Hi Kevin,
Thanks for noticing, I deployed a new jar in maven with the latest scala
version.
Eric.
Kevin Wright-4 wrote:
>
> Looking at the POM in your subversion trunk, I notice you're still
> targetting scala 2.7.4 (at least, for the maven release)
> Can I ask if you're going to be releasing a version against scala 2.7.5
> for
> Maven/Ivy/SBT users?
>
>
> On Tue, Sep 8, 2009 at 4:45 PM, Eric Torreborre
> wrote:
>
>>
>> Hi all,
>>
>> I am pleased to announce the latest release of the specs library
>> (http://code.google.com/p/specs).
>>
>> specs is a library for Behavior-Driven-Development and the latest
>> features
>> are:
>>
>> * a new execution model where local variables shared by different
>> examples
>> are automatically "cleaned-up" without having to use before/after
>> declaration:
>>
>> class ThisSpec extends Specification {
>> "this system" should {
>> var x = 0
>> "have one example using a variable" in {
>> x += 1
>> x must_== 1
>> }
>> "have another example reusing the same variable" in {
>> x must_== 0 // the side-effect from the previous example is not
>> affecting this one
>> }
>> }
>> }
>>
>> * in this release, examples and sub-examples have also been refactored
>> so
>> that sub-examples can be arbitrarily nested. This is particularly useful
>> when you want to specify sub-examples sharing a common context but
>> specializing it with more specific data:
>>
>> class CustomerSpec extends Specification {
>> "a customer" should {
>> var c = customer // general context
>> "have an empty name by default" in {
>> c.name must be empty
>> }
>> "have a mobile phone" in {
>> c.phone = Some(mobile) // specific context for a customer with a
>> mobile phone
>> "the mobile phone owner is the customer" in {
>> c.phone.owner must be(c)
>> }
>> }
>> }
>> }
>>
>> * an EasyMock trait to complete the trilogy of Java mocking libraries
>> (the
>> other 2 are JMock and Mockito) accessible from specs
>>
>> Please post your comments, feedback, suggestions on the specs-users
>> google
>> group.
>>
>> Thanks,
>>
>> Eric.
>> --
>> View this message in context:
>> http://www.nabble.com/-ANN--specs-1.6.0-tp25348796p25348796.html
>> Sent from the Scala mailing list archive at Nabble.com.
>>
>>
>
>
Tue, 2009-09-08, 23:37
#6
Re: [ANN] specs 1.6.0
Mark,
You're right, the library works fine if I add it to an existing scala 2.7.5 project in, say, eclipse.
The real problem is then I'm using maven, my project is targeted to scala 2.7.5 and one of my dependencies transitively pulls in scala 2.7.4. The maven scala plugin really doesn't like seeing multiple versions.
On Tue, Sep 8, 2009 at 10:17 PM, Mark Harrah <harrah@bu.edu> wrote:
You're right, the library works fine if I add it to an existing scala 2.7.5 project in, say, eclipse.
The real problem is then I'm using maven, my project is targeted to scala 2.7.5 and one of my dependencies transitively pulls in scala 2.7.4. The maven scala plugin really doesn't like seeing multiple versions.
On Tue, Sep 8, 2009 at 10:17 PM, Mark Harrah <harrah@bu.edu> wrote:
On Tuesday 08 September 2009 17:02, Kevin Wright wrote:
> Looking at the POM in your subversion trunk, I notice you're still
> targetting scala 2.7.4 (at least, for the maven release)
> Can I ask if you're going to be releasing a version against scala 2.7.5 for
> Maven/Ivy/SBT users?
I be surprised if there were issues using specs (compiled against 2.7.4) with
2.7.5. If you are referring to issues using it with sbt, I have to update
sbt to work with specs 1.6.0 since some things changed.
Thanks,
Mark
Hi Eric,
I noticed you included Conductor in this release:
http://code.google.com/p/specs/wiki/ThreadsSpecification
Did you get that from ScalaTest?
Bill
On Tue, Sep 8, 2009 at 8:45 AM, Eric Torreborre wrote:
>
> Hi all,
>
> I am pleased to announce the latest release of the specs library
> (http://code.google.com/p/specs).
>
> specs is a library for Behavior-Driven-Development and the latest features
> are:
>
> * a new execution model where local variables shared by different examples
> are automatically "cleaned-up" without having to use before/after
> declaration:
>
> class ThisSpec extends Specification {
> "this system" should {
> var x = 0
> "have one example using a variable" in {
> x += 1
> x must_== 1
> }
> "have another example reusing the same variable" in {
> x must_== 0 // the side-effect from the previous example is not
> affecting this one
> }
> }
> }
>
> * in this release, examples and sub-examples have also been refactored so
> that sub-examples can be arbitrarily nested. This is particularly useful
> when you want to specify sub-examples sharing a common context but
> specializing it with more specific data:
>
> class CustomerSpec extends Specification {
> "a customer" should {
> var c = customer // general context
> "have an empty name by default" in {
> c.name must be empty
> }
> "have a mobile phone" in {
> c.phone = Some(mobile) // specific context for a customer with a
> mobile phone
> "the mobile phone owner is the customer" in {
> c.phone.owner must be(c)
> }
> }
> }
> }
>
> * an EasyMock trait to complete the trilogy of Java mocking libraries (the
> other 2 are JMock and Mockito) accessible from specs
>
> Please post your comments, feedback, suggestions on the specs-users google
> group.
>
> Thanks,
>
> Eric.
> --
> View this message in context: http://www.nabble.com/-ANN--specs-1.6.0-tp25348796p25348796.html
> Sent from the Scala mailing list archive at Nabble.com.
>
>