[rspec-devel] Confusion over SharedExampleGroups
brian at pivotallabs.com
Wed Apr 29 12:42:27 EDT 2009
A colleague of mine ran into issues with the usage of SharedExampleGroups.
He was expecting it to create its own ExampleGroup (describe block)
when it is invoked using it_should_behave_like, and was surprised when
test pollution occurred due to a before block in the
What is your experience with this?
Should there be another type of SharedExampleGroup that does
encapsulate before blocks?
shared_describe "My shared specs" do
@defined_in_shared_example_group = true
it "should not interfere with other specs" do
describe Foobar do
it_should_behave_like "My shared specs"
it "should not see defined_in_shared_example_group" do
More information about the rspec-devel