Aslak,

I just ran the simple examples in your latest version of cucumber_java, and
it still exposes the ambiguous steps problem that I'm seeing.  Before I
could get it to run, I had to make some changes to the cucumber-maven
project:

The class CucumberMojo has Java 6'isms in  it and the client I'm working
with is still on Java 5.  Specifically:

1. I had to replace calls to String.isEmpty() to use the length() method
instead.
2. I had to remove the @override annotation on the execute() method (the
interface never had this method?)

Once I did that, then I cleaned my local maven repository, did a "mvn clean
package install" in the cucumber_java
root directory then went down into the examples/simple directory and did a
"mvn clean package".

Then when I went to run the simple tests in cucumber_java/examples/simple
using the command:

        jruby -S cucumber features

I see the ambiguous steps definition error again, but I'm also seeing
argument type mismatch in StepDefinitionExtras...
Attached below is the dump of my test run.  Hope this helps.

thanks in advance,

-- 
John Goodsen                 RADSoft / Better Software Faster
[email protected]            Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com          Ruby on Rails and Java Solutions



---------------- TEST RUN RESULTS BELOW
---------------------------------------------------------------------

pcp072050pcs:simple jgoodsen8440$ jruby -S cucumber --guess features
Feature: Simple

  Scenario: 3 cukes                  # features/demo.feature:3
    Given I have 3 green cukes       # public void
simple.StuffSteps.iHaveNCukes(int,java.lang.String)
      java.lang.IllegalArgumentException: argument type mismatch
(Cucumber::PureJava::StepDefinitionExtras::JavaException)
      cucumber/internal/StepDefinition.java:33:in `invokeOnTarget'
      cucumber/internal/StepDefinition.java:28:in `invokeOnTarget'
      features/demo.feature:4:in `Given I have 3 green cukes'
    When I add a table               # public void
simple.StuffSteps.iAddATable(cucumber.Table)
      | a | b |
      | 1 | 2 |
    Then I should have 3 green cukes # public void
simple.StuffSteps.iShouldHaveNCukes(int,java.lang.String)

  Scenario: 4 cukes                  # features/demo.feature:10
    Given I have 4 green cukes       # features/demo.feature:11
      Ambiguous match of "I have 4 green cukes":

      public void simple.StuffSteps.iHaveNCukes(int,java.lang.String):in `/I
have (\d+) (.*) cukes/'
      public void simple.StuffSteps.iHaveNCukes(int,java.lang.String):in `/I
have (\d+) (.*) cukes/'

       (Cucumber::Ambiguous)

/Users/jgoodsen8440/Applications/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.2.3.1/bin/../lib/cucumber/step_mother.rb:122:in
`step_match'

.... the rest of the stack trace removed to keep the message small...


On Sun, Apr 19, 2009 at 10:27 PM, John Goodsen <[email protected]> wrote:

>
>
> Sent from my iPhone
>
> Begin forwarded message:
>
> *From:* aslak hellesoy <[email protected]>
> *Date:* April 19, 2009 6:11:30 PM EDT
> *To:* <[email protected]>[email protected]
> *Subject:* *Re: [rspec-users] [cucumber, jruby] Same steps are being
> added  multiple t*
> *Reply-To:* rspec-users <[email protected]>
>
>
>
> On Sat, Apr 18, 2009 at 8:23 AM, Neema Cheriyath < <[email protected]>
> [email protected]> wrote:
>
>> Aslak Hellesøy wrote:
>> > On Tue, Apr 14, 2009 at 12:08 AM, John Goodsen < <[email protected]>
>> [email protected]>
>> > wrote:
>> >
>> >> OK, I'll reproduce in a simple example and create a ticket...
>> >>
>> >>
>> > Excellent - I'll get to it ASAP
>>
>
> I never got a ticket from any of you, but I have committed a fix:
>
> <http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac>
> http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac
>
> So it will be in the next release.
>
> Aslak
>
>
>>
>> I am also having the same issue with cucumber-java.
>>
>> please refer - <http://www.ruby-forum.com/topic/184342#new>
>> http://www.ruby-forum.com/topic/184342#new
>>
>> With cucumber-java , it seems that we would be able to run only one
>> feature file and one scenario in that file.
>>
>> Is there any way by which we can execute multiple feature files that
>> will invoke seperate scenarios?
>>
>> Thanks,
>> Neema
>> --
>> Posted via <http://www.ruby-forum.com/>http://www.ruby-forum.com/.
>> _______________________________________________
>> rspec-users mailing list
>>  <[email protected]>[email protected]
>>  <http://rubyforge.org/mailman/listinfo/rspec-users>
>> http://rubyforge.org/mailman/listinfo/rspec-users
>
>
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
>


-- 
John Goodsen                 RADSoft / Better Software Faster
[email protected]            Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com          Ruby on Rails and Java Solutions
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to