You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
It is not currently possible to use a helper method in both the subject block and an it/specify block. e.g.
describe "Foo" do
def my_helper
MyClass
end
subject { my_helper.new }
specify { my_helper.should do_something }
end
This code gives undefined method `my_helper' for #Rspec::Core::ExampleGroup... as the subject block is being evaluated in the context of the ExampleGroup class.
If an explicit subject is specified, it should be evaluated in the context of the ExampleGroup instance (this was the case for rspec-1).