[rspec-users] undefined method `mock' for #<RSpec::Core::ExampleGroup::Nested.

Wilker wilkerlucio at gmail.com
Wed Jan 19 16:12:01 EST 2011


Yeah, that is right, because mocks live on a space that is different for
each spec (the MockSpace), this is why you can't create it in before :all ;)
---
Wilker Lúcio
http://about.me/wilkerlucio/bio
Kajabi Consultant
+55 81 82556600



On Wed, Jan 19, 2011 at 5:54 PM, Dan F. <lists at ruby-forum.com> wrote:

> Please see:
> https://github.com/rspec/rspec-rails/issues/closed#issue/279
>
> You can't create mocks in before(:all), but it will work in
> before(:each)
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> 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/20110119/eed3f05b/attachment.html>


More information about the rspec-users mailing list