Commit e27e00c097a8fc1d4dc1f99b24255fc379d49e7a

Authored by Luke Baker
2 parents 266e73bd c641828c

Merge pull request #22 from vitorbaptista/mocking_redis

Fixes Redis' mocking.
Gemfile.lock
... ... @@ -101,7 +101,7 @@ DEPENDENCIES
101 101 json_pure (= 1.4.6)
102 102 jtrupiano-timecop (= 0.2.1)
103 103 mime-types (= 1.16)
104   - mock_redis
  104 + mock_redis (= 0.4.1)
105 105 mysql2 (= 0.2.18)
106 106 newrelic_rpm (= 3.3.0)
107 107 paperclip (= 2.3.1)
... ...
config/environments/cucumber.rb
... ... @@ -21,8 +21,6 @@ config.action_controller.allow_forgery_protection = false
21 21 # ActionMailer::Base.deliveries array.
22 22 config.action_mailer.delivery_method = :test
23 23  
24   -$redis = MockRedis.new
25   -
26 24 HOST = "localhost"
27 25 AUTHORIZE_NET_API_LOGIN_ID = ''
28 26 AUTHORIZE_NET_TRANSACTION_KEY = ''
... ...
config/environments/test.rb
... ... @@ -21,8 +21,6 @@ config.action_controller.allow_forgery_protection = false
21 21 # ActionMailer::Base.deliveries array.
22 22 config.action_mailer.delivery_method = :test
23 23  
24   -$redis = MockRedis.new
25   -
26 24 HOST = 'localhost'
27 25  
28 26 AUTHORIZE_NET_API_LOGIN_ID = ''
... ...
features/support/env.rb
... ... @@ -21,6 +21,7 @@ Webrat.configure do |config|
21 21 config.open_error_files = false # Set to true if you want error pages to pop up in the browser
22 22 end
23 23  
  24 +$redis = MockRedis.new
24 25  
25 26 # If you set this to false, any error raised from within your app will bubble
26 27 # up to your step definition and out to cucumber unless you catch it somewhere
... ...
spec/spec_helper.rb
... ... @@ -9,6 +9,8 @@ require 'spec/rails'
9 9 # in ./support/ and its subdirectories.
10 10 Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
11 11  
  12 +$redis = MockRedis.new
  13 +
12 14 Spec::Runner.configure do |config|
13 15 # If you're not using ActiveRecord you should remove these
14 16 # lines, delete config/database.yml and disable :active_record
... ...