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
This problem only occurs when running the full set of specs on the rails project. When a shared_examples block has identical example metadata as the top-level describe block in another spec, those examples are automatically included in that spec as well.
Work Around: Move the example metadata inside the shared_example, either directly on the tests or in a describe block.
Using rspec-rails 3.1.0
Code example:
describe FooController, example_field: 'Foobar' do
it 'will run this test' do
....
end
end
describe Bar do
shared_examples 'some shared example, example_field: 'Foobar' do
it 'will also run this test' do
....
end
end
end