Sha256: cbdeeb731934bc7a158f2bdfb054bd78808c8dda5c28ff705834a45ccef60adf

Contents?: true

Size: 411 Bytes

Versions: 1

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

#
# ENV stubbing is opt-in, via a shared context, rather than global
#
# Usage:
#
# describe 'my stubbed test' do
#   include_context 'with stubbed env'
#   before do
#     stub_env('FOO' => 'is bar')
#   end
#   it 'does a thing' do
#     expect(ENV['FOO']).to eq('is bar')
#   end
# end
#

RSpec.shared_context 'with stubbed env' do
  include RSpec::StubbedEnv::TestHelpers
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-stubbed_env-1.0.0 lib/rspec/stubbed_env/config.rb