Cucumber 0.10.2 / cucumber-rails-0.4.0 - Where did assert go?

45 views
Skip to first unread message

byrnejb

unread,
Mar 22, 2011, 10:29:08 AM3/22/11
to Cukes
I had to revert to cucumber-0.10.0 after a brief trial of
cucumber-0.10.2. At the moment I do not have time to track down what
is causing this but after an upgrade to 0.10.0 / 0.4.0 and running the
generator assert statements in my steps do not work any more. I get
method missing errors instead:

undefined method `add_assertion' for nil:NilClass (NoMethodError)
/home/byrnejb/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/test/unit/
testcase.rb:125:in `add_assertion'
/home/byrnejb/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/test/unit/
assertions.rb:494:in `_wrap_assertion'
/home/byrnejb/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/test/unit/
assertions.rb:61:in `assert'

These are just plain jane assert( condition ) statements. I tried
adding in require 'test/unit' in env.rb without any success and as I
am rather pressed for time I just backed out the update. However, if
there is some simple step that I am missing which enables use of test
unit asserts with cucumber-0.10.2 then I would appreciate having it
pointed out to me.

David Chelimsky

unread,
Mar 22, 2011, 10:32:30 AM3/22/11
to cu...@googlegroups.com

The error above is being raised from testcase.rb, so I don't think it's a matter of not finding test/unit. Not that I have any other ideas to offer :)

Cheers,
David

aslak hellesoy

unread,
Mar 22, 2011, 10:49:43 AM3/22/11
to cu...@googlegroups.com, byrnejb

Not sure what's causing this, but I made some fixes to Cucumber to
deal with this issue:
https://github.com/aslakhellesoy/cucumber-rails/issues/closed#issue/69
@_result.add_assertion in testcase.rb:125 is failing because @_result is nil.

That's how far I have time to dig now, hopefully this is enough to
produce a patch for Cucumber.

Aslak

>
> --
> 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 http://groups.google.com/group/cukes?hl=en.
>

Reply all
Reply to author
Forward
0 new messages