Module | RSpec::Core::SharedContext |
In: |
lib/rspec/core/shared_context.rb
|
Exposes [ExampleGroup](ExampleGroup)-level methods to a module, so you can include that module in an [ExampleGroup](ExampleGroup).
@example
module LoggedInAsAdmin extend RSpec::Core::SharedContext before(:each) do log_in_as :admin end end describe "admin section" do include LoggedInAsAdmin # ... end