Hi,I try to get Cucumber tests running with JRuby via maven. So far I have made two attempts, both start cucumber, but they both trip over the step definitions. Please see these gists for my attempts: https://gist.github.com/Y3PP3R/5337722 and https://gist.github.com/Y3PP3R/5345915.Error is: NoMethodError: undefined method `Given' for main:Object (at first stepfile.rb line 1). This line contains:Given /^I check out the homepage$/ doWith plain ruby I can just run my cucumber tests, no errors.How can I make JRuby recognize my step files?
Thanks,Jasper--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Tue, Apr 9, 2013 at 3:11 PM, Jasper Timmer <jjwt...@gmail.com> wrote:
Hi,I try to get Cucumber tests running with JRuby via maven. So far I have made two attempts, both start cucumber, but they both trip over the step definitions. Please see these gists for my attempts: https://gist.github.com/Y3PP3R/5337722 and https://gist.github.com/Y3PP3R/5345915.Error is: NoMethodError: undefined method `Given' for main:Object (at first stepfile.rb line 1). This line contains:Given /^I check out the homepage$/ doWith plain ruby I can just run my cucumber tests, no errors.How can I make JRuby recognize my step files?The tests in the cucumber-jruby module are passing, so I'm not aware of any bugs. I assume there is something wrong with your project.Can you share a project on github where we can reproduce what you see?
On Wednesday, 10 April 2013 at 11:56, Jasper Timmer wrote:
Hi,
Op dinsdag 9 april 2013 18:27:03 UTC+2 schreef Aslak Hellesøy het volgende:On Tue, Apr 9, 2013 at 3:11 PM, Jasper Timmer <jjwt...@gmail.com> wrote:Hi,I try to get Cucumber tests running with JRuby via maven. So far I have made two attempts, both start cucumber, but they both trip over the step definitions. Please see these gists for my attempts: https://gist.github.com/Y3PP3R/5337722 and https://gist.github.com/Y3PP3R/5345915.Error is: NoMethodError: undefined method `Given' for main:Object (at first stepfile.rb line 1). This line contains:Given /^I check out the homepage$/ doWith plain ruby I can just run my cucumber tests, no errors.How can I make JRuby recognize my step files?The tests in the cucumber-jruby module are passing, so I'm not aware of any bugs. I assume there is something wrong with your project.Can you share a project on github where we can reproduce what you see?I did some more work and investigation, and now I have the following pom.xml, which will run my feature file: https://gist.github.com/Y3PP3R/5353619, only thing is I need capybara support (AKA I need tagged hooks support as per https://github.com/cucumber/cucumber-jvm/issues/467). Is this something small?
On Saturday, 13 April 2013 at 13:06, Jasper Timmer wrote:
Hm, I think I didn't have the snapshot cucumber-jruby jar on my classpath, it's gone now. Still struggling though:←[1A←[31mFailure in before hook:←[0m←[31msrc/test/gems/gems/capybara-2.1.0/lib/capybara/cucumber.rb:21←[0m←[31mMessage: ←[0m←[31morg.jruby.exceptions.RaiseException: (NoMethodError) undefined method `source_tag_names' for #
Hi Aslak,I am having the same issue with cucumber-jvm when trying to run via maven-ant-plugin, stuck with "[java] NoMethodError: undefined method `Given' for main:Object". I see you had solved this issue
but did not see what was the fix. Could you please post the fix how you made this work.Thanks,Major
On Tuesday, April 9, 2013 9:11:06 AM UTC-5, Jasper Timmer wrote:
Hi,I try to get Cucumber tests running with JRuby via maven. So far I have made two attempts, both start cucumber, but they both trip over the step definitions. Please see these gists for my attempts: https://gist.github.com/Y3PP3R/5337722 and https://gist.github.com/Y3PP3R/5345915.Error is: NoMethodError: undefined method `Given' for main:Object (at first stepfile.rb line 1). This line contains:Given /^I check out the homepage$/ doWith plain ruby I can just run my cucumber tests, no errors.How can I make JRuby recognize my step files?
Thanks,Jasper
On Thursday, June 6, 2013, Major Paul wrote:Hi Aslak,I am having the same issue with cucumber-jvm when trying to run via maven-ant-plugin, stuck with "[java] NoMethodError: undefined method `Given' for main:Object". I see you had solved this issuePlease refresh my memory. Where did you see that I solved this?Aslak
but did not see what was the fix. Could you please post the fix how you made this work.Thanks,Major--
On Tuesday, April 9, 2013 9:11:06 AM UTC-5, Jasper Timmer wrote:Hi,I try to get Cucumber tests running with JRuby via maven. So far I have made two attempts, both start cucumber, but they both trip over the step definitions. Please see these gists for my attempts: https://gist.github.com/Y3PP3R/5337722 and https://gist.github.com/Y3PP3R/5345915.Error is: NoMethodError: undefined method `Given' for main:Object (at first stepfile.rb line 1). This line contains:Given /^I check out the homepage$/ doWith plain ruby I can just run my cucumber tests, no errors.How can I make JRuby recognize my step files?Thanks,Jasper
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
@Aslak: It was not resolved,
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/T0Jtf2g5ofc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.
Aslak,As you said, I am waiting for the release of the new release of cucumber-jvm with the fix for the issue cucumber-jvm tag @Given hooks not recognized.
I am wondering if there's a way for me test this issue with a snapshot version, while you build the release. So, I will know if there's any other issues on my environment.
AslakI tried fixing the cucumber-jvm for JRuby specifically and still have not made much progress. I understand it's running fine on Travis and on your box. Could you suggest anything that may need to be setup when running first time?
The failure on cucumber-JVM (JRuby) is onFailed tests: featureWithOutlineTest(cucumber.runtime.formatter.JSONPrettyFormatterTest):at the last line of the JSON test data, there's a mismatch:expected - "uri": "cucumber\runtime\formatter\JSONPrettyFormatterTest.feature"actual - "uri": "cucumber\\runtime\\formatter\\JSONPrettyFormatterTest.feature"Also, I am not sure how I would get a copy of snapshot from the source server? If you don't mind could you resend the procedure?
Thanks,MajorOn Tuesday, April 9, 2013 9:11:06 AM UTC-5, Jasper Timmer wrote:
Hi,I try to get Cucumber tests running with JRuby via maven. So far I have made two attempts, both start cucumber, but they both trip over the step definitions. Please see these gists for my attempts: https://gist.github.com/Y3PP3R/5337722 and https://gist.github.com/Y3PP3R/5345915.Error is: NoMethodError: undefined method `Given' for main:Object (at first stepfile.rb line 1). This line contains:Given /^I check out the homepage$/ doWith plain ruby I can just run my cucumber tests, no errors.How can I make JRuby recognize my step files?Thanks,Jasper
--
On Mon, Jun 24, 2013 at 1:40 PM, Major Paul <majorp...@gmail.com> wrote:
AslakI tried fixing the cucumber-jvm for JRuby specifically and still have not made much progress. I understand it's running fine on Travis and on your box. Could you suggest anything that may need to be setup when running first time?Fork it and create a pull request:The failure on cucumber-JVM (JRuby) is onFailed tests: featureWithOutlineTest(cucumber.runtime.formatter.JSONPrettyFormatterTest):at the last line of the JSON test data, there's a mismatch:expected - "uri": "cucumber\runtime\formatter\JSONPrettyFormatterTest.feature"actual - "uri": "cucumber\\runtime\\formatter\\JSONPrettyFormatterTest.feature"