module RSpec::Core::SharedContext

Exposes {ExampleGroup}-level methods to a module, so you can include that module in an {ExampleGroup}.

@example

module LoggedInAsAdmin
  extend RSpec::Core::SharedContext
  before(:example) do
    log_in_as :admin
  end
end

describe "admin section" do
  include LoggedInAsAdmin
  # ...
end