[rspec-users] `add_scenario': wrong, number of arguments (1 for 2)

Yi Wen hayafirst at gmail.com
Tue Nov 18 17:32:41 EST 2008


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>


More information about the rspec-users mailing list