Commit e27e00c097a8fc1d4dc1f99b24255fc379d49e7a

Authored by Luke Baker
2 parents 266e73bd c641828c

Merge pull request #22 from vitorbaptista/mocking_redis

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