Module: RSpec::Core::SharedContext

Defined in:
lib/rspec/core/shared_context.rb

Overview

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

Examples:


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

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