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
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).
The text was updated successfully, but these errors were encountered:
It is not currently possible to use a helper method in both the subject block and an it/specify block. e.g.
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).
The text was updated successfully, but these errors were encountered: