Help getting started

34 views
Skip to first unread message

Adam Tybor

unread,
Feb 6, 2011, 3:26:38 AM2/6/11
to easyb...@googlegroups.com
I have been trying to get started using easyb with a very simple specification and for the life of me I can't can't get anything working.  Just an FYI, I am not a java or groovy guy so please make no assumptions that I have anything configured correctly.  Any help would be appreciated.

I have added a .\src\test\easyb\ folder to my project with the following file HelloWorld.specification

description "Hello world"

it "should be hello world" {
  "hello".shouldBe "world"
}

Here is the output when trying to run the maven plugin.
[INFO] 
[INFO] --- maven-easyb-plugin:0.9.7-1:test (default-cli) @ child-injectors ---
[INFO] Using easyb dependency org.easyb:easyb:jar:0.9.7:compile
[INFO] Using easyb dependency commons-cli:commons-cli:jar:1.1:compile
[INFO] Using easyb dependency org.codehaus.groovy:groovy-all:jar:1.7.2:compile
     [java] Running hello world specification (HelloWorld.specification)
     [java] There was an error running your easyb story or specification
     [java] groovy.lang.MissingMethodException: No signature of method: HelloWorld.should be hello world() is applicable for argument types: (HelloWorld$_run_closure1) values: [HelloWorld$_run_closure1@1abcc03]
     [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
     [java] at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
     [java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
     [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
     [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
     [java] at HelloWorld.run(HelloWorld.specification:3)
     [java] at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
     [java] at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627)
     [java] at org.easyb.domain.Specification.execute(Specification.java:43)
     [java] at org.easyb.BehaviorRunner.executeBehaviors(BehaviorRunner.java:126)
     [java] at org.easyb.BehaviorRunner.runBehaviors(BehaviorRunner.java:79)
     [java] at org.easyb.BehaviorRunner.main(BehaviorRunner.java:56)



Dominique Jocal

unread,
Feb 6, 2011, 6:29:59 AM2/6/11
to easyb...@googlegroups.com
adam, a comma is missing between the text of the "it" behavior and its closure

it "should be hello world", {

text and closure are 2 parameters of "it" and all others behaviors.

regards
Dominique.

2011/2/6 Adam Tybor <adam....@gmail.com>


--
You received this message because you are subscribed to the Google Groups "Easyb Users" group.
To post to this group, send email to easyb...@googlegroups.com.
To unsubscribe from this group, send email to easyb-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/easyb-users?hl=en.

Adam Tybor

unread,
Feb 6, 2011, 4:02:08 PM2/6/11
to easyb...@googlegroups.com
You have to be kidding me, thank you very much, works like a charm.

Is there any way in intellij I can run all my specs without running the whole maven build process?  It looks like I can only run 1 file at a time.

Thanks again,
Adam

Dave Newton

unread,
Feb 6, 2011, 5:02:25 PM2/6/11
to easyb...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages