Registry / testing / rspec-stubbed-env

rspec-stubbed-env

JSON →
library1.0.4rbrubygemsunverified

Stubs or hides environment variables in a scoped context for testing, using stub_env and hide_env helpers.

gem install rspec-stubbed_env
INSTALL
IMPORT
SIG · RSPEC-STUBBED-ENV
R
rspec-stubbed-env
testingrubyv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RSpec::StubbedEnv
✓ require 'rspec/stubbed_env'

Stub environment variables within a test example.

require 'rspec/stubbed_env' RSpec.describe 'my test' do include RSpec::StubbedEnv it 'stubs env' do stub_env('REDIS_URL' => 'redis://localhost:6379/') expect(ENV['REDIS_URL']).to eq('redis://localhost:6379/') end end
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.4latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Amazon
1
Resources
rspec-stubbed-env — gem install rspec-stubbed-env · libregistry