No idea why that’s not working with your short snippet of code, but you’re running a very out of date version of RSpec, you should upgrade to 2.99, which should be entirely compatible with your existing test suite, fix any deprecations or warnings (transpec can help with this) and then upgrade to 3.2, we have comprehensive documentation on how to do this at http://rspec.info/upgrading-from-rspec-2/
Jon Rowe --------------------------- [email protected] jonrowe.co.uk On Thursday, 12 February 2015 at 19:06, Aydar Omurbekov wrote: > favorite > (http://stackoverflow.com/questions/28471455/shared-context-in-rails-2-not-working#) > > I am using rspec-rails (2.13.0) rspec-core (~> 2.13.0) This shared_context is > not > workinghttp://www.relishapp.com/rspec/rspec-core/v/2-11/docs/example-groups/shared-context > > > > > > > > describe "group that includes a shared context using 'include_context'" do > include_context "shared stuff" it "has access to methods defined in shared > context" do shared_method.should eq("it works") end end Failure/Error: > include_context "it works" NoMethodError: undefined method `include_context' > for #<RSpec::Core::ExampleGroup::Nested_1:0x0000000aa4b668> > > -- > You received this message because you are subscribed to the Google Groups > "rspec" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > (mailto:[email protected]). > To post to this group, send email to [email protected] > (mailto:[email protected]). > To view this discussion on the web visit > https://groups.google.com/d/msgid/rspec/9f0316b0-ad4a-4eea-a0d0-d9fdb8d97be4%40googlegroups.com > > (https://groups.google.com/d/msgid/rspec/9f0316b0-ad4a-4eea-a0d0-d9fdb8d97be4%40googlegroups.com?utm_medium=email&utm_source=footer). > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/562DD0916A5045B99DB2ADA9CC6E416F%40jonrowe.co.uk. For more options, visit https://groups.google.com/d/optout.
