Bret Pettichord
2008-Nov-18 21:16 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
I am trying to get some old "rbehave" scripts working with cucumber. I
am running into an error. I get the same error when I run the
"calculator_ruby_features" example.
Any suggestions?
Bret
C:\work\cucumber\examples\calculator_ruby_features>rake features
(in C:/work/cucumber/examples/calculator_ruby_features)
You must gem install win32console to get coloured output on this ruby
platform (
i386-mswin32)
C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:37:in
`add_scenario'': wrong
number of arguments (1 for 2) (ArgumentError)
from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:37:in
`Scenari
o''
from ./features/addition.rb:8
from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:13:in
`instanc
e_eval''
from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:13:in
`initial
ize''
from C:/work/cucumber/bin/../lib/cucumber/tree.rb:8:in `new''
from C:/work/cucumber/bin/../lib/cucumber/tree.rb:8:in
`Feature''
from ./features/addition.rb:6
from
c:/ruby-186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27
:in `gem_original_require''
from
c:/ruby-186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27
:in `require''
from C:/work/cucumber/bin/../lib/cucumber/cli.rb:188:in
`require_files''
from C:/work/cucumber/bin/../lib/cucumber/cli.rb:186:in `each''
from C:/work/cucumber/bin/../lib/cucumber/cli.rb:186:in
`require_files''
from C:/work/cucumber/bin/../lib/cucumber/cli.rb:165:in
`execute!''
from C:/work/cucumber/bin/../lib/cucumber/cli.rb:11:in
`execute''
from C:/work/cucumber/bin/cucumber:5
rake aborted!
Command failed with status (1): [c:/ruby-186-26/bin/ruby -I
"C:/work/cucumb...]
(See full trace by running task with --trace)
Ben Mabey
2008-Nov-18 21:51 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
Bret Pettichord wrote:> I am trying to get some old "rbehave" scripts working with cucumber. I > am running into an error. I get the same error when I run the > "calculator_ruby_features" example. > > Any suggestions? > > BretAre you using the latest cucumber from github? There was a problem with the ruby example that was recently fixed. If that is not the issue please open a ticket on Lighthouse. -Ben> > C:\work\cucumber\examples\calculator_ruby_features>rake features > (in C:/work/cucumber/examples/calculator_ruby_features) > You must gem install win32console to get coloured output on this ruby > platform ( > i386-mswin32) > C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:37:in > `add_scenario'': wrong > number of arguments (1 for 2) (ArgumentError) > from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:37:in > `Scenari > o'' > from ./features/addition.rb:8 > from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:13:in > `instanc > e_eval'' > from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:13:in > `initial > ize'' > from C:/work/cucumber/bin/../lib/cucumber/tree.rb:8:in `new'' > from C:/work/cucumber/bin/../lib/cucumber/tree.rb:8:in `Feature'' > from ./features/addition.rb:6 > from > c:/ruby-186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 > :in `gem_original_require'' > from > c:/ruby-186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 > :in `require'' > from C:/work/cucumber/bin/../lib/cucumber/cli.rb:188:in > `require_files'' > from C:/work/cucumber/bin/../lib/cucumber/cli.rb:186:in `each'' > from C:/work/cucumber/bin/../lib/cucumber/cli.rb:186:in > `require_files'' > from C:/work/cucumber/bin/../lib/cucumber/cli.rb:165:in `execute!'' > from C:/work/cucumber/bin/../lib/cucumber/cli.rb:11:in `execute'' > from C:/work/cucumber/bin/cucumber:5 > rake aborted! > Command failed with status (1): [c:/ruby-186-26/bin/ruby -I > "C:/work/cucumb...] > > (See full trace by running task with --trace) > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Yi Wen
2008-Nov-18 22:32 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
Weird, it seems like a bug to me:
def Scenario(name, &proc)
add_scenario(name, &proc)
end
def add_scenario(name, line, &proc)
scenario = Scenario.new(self, name, line, &proc)
@scenarios << scenario
scenario
end
Scenario lacks a "line" argument when calling add_scenario
Yi
On Tue, Nov 18, 2008 at 3:16 PM, Bret Pettichord <bret at
pettichord.com>wrote:
> I am trying to get some old "rbehave" scripts working with
cucumber. I am
> running into an error. I get the same error when I run the
> "calculator_ruby_features" example.
>
> Any suggestions?
>
> Bret
>
> C:\work\cucumber\examples\calculator_ruby_features>rake features
> (in C:/work/cucumber/examples/calculator_ruby_features)
> You must gem install win32console to get coloured output on this ruby
> platform (
> i386-mswin32)
> C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:37:in
`add_scenario'':
> wrong
> number of arguments (1 for 2) (ArgumentError)
> from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:37:in
> `Scenari
> o''
> from ./features/addition.rb:8
> from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:13:in
> `instanc
> e_eval''
> from C:/work/cucumber/bin/../lib/cucumber/tree/feature.rb:13:in
> `initial
> ize''
> from C:/work/cucumber/bin/../lib/cucumber/tree.rb:8:in `new''
> from C:/work/cucumber/bin/../lib/cucumber/tree.rb:8:in
`Feature''
> from ./features/addition.rb:6
> from
> c:/ruby-186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27
> :in `gem_original_require''
> from
> c:/ruby-186-26/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27
> :in `require''
> from C:/work/cucumber/bin/../lib/cucumber/cli.rb:188:in
> `require_files''
> from C:/work/cucumber/bin/../lib/cucumber/cli.rb:186:in
`each''
> from C:/work/cucumber/bin/../lib/cucumber/cli.rb:186:in
> `require_files''
> from C:/work/cucumber/bin/../lib/cucumber/cli.rb:165:in
`execute!''
> from C:/work/cucumber/bin/../lib/cucumber/cli.rb:11:in
`execute''
> from C:/work/cucumber/bin/cucumber:5
> rake aborted!
> Command failed with status (1): [c:/ruby-186-26/bin/ruby -I
> "C:/work/cucumb...]
>
> (See full trace by running task with --trace)
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/rspec-users/attachments/20081118/7fc17a2a/attachment.html>
Bret Pettichord
2008-Nov-19 01:46 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
Ben Mabey wrote:> Are you using the latest cucumber from github?Yes. I did a git pull and reproduced the error right before reporting it. Afterwards, I converted my test to use the new *.feature format and this worked fine. I am curious what the thinking is about supporting the old format. I suspect that I''ll be moving to the new format, but want to know what the feeling is with others. Bret
Bret Pettichord
2008-Nov-19 02:03 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
Ben Mabey wrote:> > If that is not the issue please open a ticket on Lighthouse.I tried. lighthouse error
aslak hellesoy
2008-Nov-19 07:10 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
On Wed, Nov 19, 2008 at 2:46 AM, Bret Pettichord <bret at pettichord.com> wrote:> Ben Mabey wrote: >> >> Are you using the latest cucumber from github? > > Yes. I did a git pull and reproduced the error right before reporting it. >This was fixed three days ago (!?) http://github.com/aslakhellesoy/cucumber/commit/167068245a53629cd3ede6cc9d7353aabc3f6907> Afterwards, I converted my test to use the new *.feature format and this > worked fine. > > I am curious what the thinking is about supporting the old format. I suspect > that I''ll be moving to the new format, but want to know what the feeling is > with others. >Interesting you should ask. I added it to make the migration easier for those who used it. However, I have a feeling that very few are using it, so in the long run I''d like to bag it. Maybe deprecate it in next release and bag it 2-3 releases later. Let the hollering begin.> Bret > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
aslak hellesoy
2008-Nov-19 07:11 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
On Wed, Nov 19, 2008 at 3:03 AM, Bret Pettichord <bret at pettichord.com> wrote:> Ben Mabey wrote: >> >> If that is not the issue please open a ticket on Lighthouse. > > I tried. > > lighthouse errorelaborate?> > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Bret Pettichord
2008-Nov-19 16:17 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
aslak hellesoy wrote:> On Wed, Nov 19, 2008 at 3:03 AM, Bret Pettichord <bret at pettichord.com> wrote: > >> Ben Mabey wrote: >> >>> If that is not the issue please open a ticket on Lighthouse. >>> >> I tried. >> >> lighthouse error >> > > elaborate? >I got a generic lighthouse error. I pasted a screenshot image, but somehow it was stripped from my email along the way. No matter.
Bret Pettichord
2008-Nov-19 16:23 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
aslak hellesoy wrote:> On Wed, Nov 19, 2008 at 2:46 AM, Bret Pettichord <bret at pettichord.com> wrote: > >> Ben Mabey wrote: >> >>> Are you using the latest cucumber from github? >>> >> Yes. I did a git pull and reproduced the error right before reporting it. >> > This was fixed three days ago (!?) > http://github.com/aslakhellesoy/cucumber/commit/167068245a53629cd3ede6cc9d7353aabc3f6907 >I''m a newb to git and apparently need to learn more about how to use it correctly. I''m wondering if i somehow updated my local repo without updating my workspace.>> Afterwards, I converted my test to use the new *.feature format and this >> worked fine. >> >> I am curious what the thinking is about supporting the old format. I suspect >> that I''ll be moving to the new format, but want to know what the feeling is >> with others. >> > > Interesting you should ask. I added it to make the migration easier > for those who used it. > However, I have a feeling that very few are using it, so in the long > run I''d like to bag it. > Maybe deprecate it in next release and bag it 2-3 releases later. > > Let the hollering begin. >Makes sense to me.
aslak hellesoy
2008-Nov-19 17:54 UTC
[rspec-users] `add_scenario'': wrong, number of arguments (1 for 2)
On Wed, Nov 19, 2008 at 5:23 PM, Bret Pettichord <bret at pettichord.com> wrote:> aslak hellesoy wrote: >> >> On Wed, Nov 19, 2008 at 2:46 AM, Bret Pettichord <bret at pettichord.com> >> wrote: >> >>> >>> Ben Mabey wrote: >>> >>>> >>>> Are you using the latest cucumber from github? >>>> >>> >>> Yes. I did a git pull and reproduced the error right before reporting it. >>> >> >> This was fixed three days ago (!?) >> >> http://github.com/aslakhellesoy/cucumber/commit/167068245a53629cd3ede6cc9d7353aabc3f6907 >> > > I''m a newb to git and apparently need to learn more about how to use it > correctly. I''m wondering if i somehow updated my local repo without updating > my workspace.With Git the workspace and local repo is the same thing. Every working copy *is* a repository.>>> >>> Afterwards, I converted my test to use the new *.feature format and this >>> worked fine. >>> >>> I am curious what the thinking is about supporting the old format. I >>> suspect >>> that I''ll be moving to the new format, but want to know what the feeling >>> is >>> with others. >>> >> >> Interesting you should ask. I added it to make the migration easier >> for those who used it. >> However, I have a feeling that very few are using it, so in the long >> run I''d like to bag it. >> Maybe deprecate it in next release and bag it 2-3 releases later. >> >> Let the hollering begin. >> > > Makes sense to me. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >