Module: Saharspec::Metadata

Defined in:
lib/saharspec/metadata.rb,
lib/saharspec/metadata/lets.rb

Overview

Wrapper module for all RSpec additions available via example or context metadata.

Note: because including some functionality by context metadata is not obvious, saharspec doesn't require them by default when you require 'saharspec' or require 'saharspec/metadata', you need to require specifically the functionality you are planning to use.

See:

Lets

context 'with admin', lets: {role: :admin} do
  it { is_expected.to be_allowed }
end

# this is the same as
context 'with admin' do
  let(:role) { :admin }

  it { is_expected.to be_allowed }
end

Defined Under Namespace

Modules: Lets