I'd like to make a gem, which includes several `RSpec.shared_context` 
definitions. These are useful for other gems which share the same testing 
environment but do different things, to use the same shared 
examples/contexts.

However, I'd also like to test that my shared contexts are doing the right 
thing. In some cases, they simply ensure that some stuff has been set up 
correctly. In other cases, they check pre- and post- invariants.

1/ What is the best way to make a gem containing shared contexts/examples

2/ In the gem that's making these available, what's the best way to test 
them? I'm assuming... I'm going to write a test case and, then, another 
test case which invokes the first test case. In the case of setup, I'd like 
to ensure that the given `let` variables exist, and in the case of the 
invariant check, to detect success/failure, and confirm that the invariant 
is firing correctly.

Thanks for any help/input.

-- 
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/fa5dd6e0-4008-4bfc-a760-855bd3b0502c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to