"buildr test" now picks up my specification but fails to run it. The
exception seems to be related
easyb's 'before' method.
Running comparison service specification
(ComparisonServiceSpecification.groovy)
There was an error running your easyb story or specification
groovy.lang.MissingMethodException: No signature of method:
sdp.comparisons.impl.ComparisonServiceSpecification.create a new
DefaultComparisonService() is applicable for argument types:
(sdp.comparisons.impl.ComparisonServiceSpecification$_run_closure1) values:
{sdp.comparisons.impl.ComparisonServiceSpecification$_run_closure1@39a26ac5}
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:88)
at
sdp.comparisons.impl.ComparisonServiceSpecification.run(ComparisonServiceSpecification.groovy:7)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:473)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:508)
at
org.disco.easyb.domain.Specification.execute(Specification.java:26)
at
org.disco.easyb.BehaviorRunner.runBehavior(BehaviorRunner.java:75)
at org.disco.easyb.BehaviorRunner.main(BehaviorRunner.java:56)
I noticed a version discrepancy between the latest easyb and what buildr
defines. The latest
version of easyb is 1.5 and it located under a different artifact id:
'org.easyb:easyb-core:jar:1.5'
I can't redefine the version because the artifact id has changed.
Also the setting to update
the version is 'jbehave'.
Is there a proper configuration of buildr/easyb that will made my spec
work? For reference my
spec is defined as:
description "This exercises the guards in ComparisonService API"
before "create a new DefaultComparisonService" {
service = new DefaultComparisonService()
}
it "parse API should protect against nulls" {
ensureThrows(IllegalArgumentException) {
service.parse (String) null
service.parse (InputStream) null
}
}
it "parse String API should protect against empty string" {
ensureThrows(IllegalArgumentException) {
service.parse ""
}
}
Thanks!
Anthony Bargnesi
On Wed, Aug 29, 2012 at 1:34 PM, Anthony Bargnesi <[email protected]>wrote:
> Hello,
>
> I have a project with java main source, java test source, and groovy
> specifications with easyb. I configure a new layout structure as follows:
>
> layout = Layout.new
> layout[:source, :main, :java] = 'src'
> layout[:source, :test, :java] = 'test'
> layout[:source, :spec, :groovy] = 'spec'
> layout[:source, :main, :resources] = 'resources'
> layout[:source, :test, :resources] = 'test'
> layout[:target, :main, :classes] = 'target/classes'
>
> I declare easyb testing with:
>
> test.using :easyb
>
> test.compile.with 'org.codehaus.groovy:groovy:jar:2.0.1',
> 'org.easyb:easyb-core:jar:1.5'
>
> The specification tests are not run when I execute "buildr test".
>
> I think it is due to the EasyB module expecting :source, :spec, :groovy as
> the path to the stories and specifications.
>
> Did I provide the layout to my easyb specifications incorrectly?
>
> Thanks!
> Anthony Bargnesi
>