Skip to content

Commit

Permalink
Add Climate Control to bundle
Browse files Browse the repository at this point in the history
This gem allows to manage environment variables during tests.
  • Loading branch information
tawan committed Feb 7, 2016
1 parent f8e0be8 commit 400b04e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ gem 'fuubar'
gem 'rdoc'
gem 'byebug', :platforms => [:ruby_20, :ruby_21, :ruby_22 ]
gem 'benchmark-ips'
gem 'climate_control'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ GEM
benchmark-ips (2.3.0)
builder (3.2.2)
byebug (8.2.2)
climate_control (0.0.3)
activesupport (>= 3.0)
concurrent-ruby (1.0.0)
diff-lcs (1.2.5)
dotenv (2.1.0)
Expand Down Expand Up @@ -138,6 +140,7 @@ DEPENDENCIES
benchmark-ips
bundler
byebug
climate_control
dotenv
fuubar
rdoc
Expand Down
5 changes: 5 additions & 0 deletions spec/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require 'aws-sdk'
require 'open-uri'
require 'active_job'
require 'climate_control'

module Helpers
WEB_ENV_HOST = ENV['WEB_ENV_HOST']
Expand Down Expand Up @@ -65,6 +66,10 @@ def create_random_string(random_string)
resp
end

def with_modified_env(options, &block)
ClimateControl.modify(options, &block)
end

private

def build_gem
Expand Down

0 comments on commit 400b04e

Please sign in to comment.