don't require redis for cucumber
This commit is contained in:
parent
94c7b86a55
commit
713c98ce51
2 changed files with 14 additions and 9 deletions
|
|
@ -20,7 +20,7 @@ require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links wi
|
||||||
# order to ease the transition to Capybara we set the default here. If you'd
|
# order to ease the transition to Capybara we set the default here. If you'd
|
||||||
# prefer to use XPath just remove this line and adjust any selectors in your
|
# prefer to use XPath just remove this line and adjust any selectors in your
|
||||||
# steps to use the XPath syntax.
|
# steps to use the XPath syntax.
|
||||||
Capybara.default_selector = :css
|
Capybara.default_selector = :css
|
||||||
|
|
||||||
# If you set this to false, any error raised from within your app will bubble
|
# If you set this to false, any error raised from within your app will bubble
|
||||||
# up to your step definition and out to cucumber unless you catch it somewhere
|
# up to your step definition and out to cucumber unless you catch it somewhere
|
||||||
|
|
@ -36,18 +36,24 @@ ActionController::Base.allow_rescue = false
|
||||||
# How to clean your database when transactions are turned off. See
|
# How to clean your database when transactions are turned off. See
|
||||||
# http://github.com/bmabey/database_cleaner for more info.
|
# http://github.com/bmabey/database_cleaner for more info.
|
||||||
begin
|
begin
|
||||||
require 'database_cleaner'
|
require 'database_cleaner'
|
||||||
require 'database_cleaner/cucumber'
|
require 'database_cleaner/cucumber'
|
||||||
DatabaseCleaner.strategy = :truncation
|
DatabaseCleaner.strategy = :truncation
|
||||||
DatabaseCleaner.orm = "mongo_mapper"
|
DatabaseCleaner.orm = "mongo_mapper"
|
||||||
end
|
end
|
||||||
|
|
||||||
require File.join(File.dirname(__FILE__), "..", "..", "spec", "helper_methods")
|
require File.join(File.dirname(__FILE__), "..", "..", "spec", "helper_methods")
|
||||||
include HelperMethods
|
include HelperMethods
|
||||||
|
|
||||||
|
module Resque
|
||||||
|
def enqueue(klass, *args)
|
||||||
|
klass.send(:perform, *args)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class User
|
class User
|
||||||
def send_contact_request_to(desired_contact, aspect)
|
def send_contact_request_to(desired_contact, aspect)
|
||||||
request = Request.instantiate(:to => desired_contact,
|
request = Request.instantiate(:to => desired_contact,
|
||||||
:from => self.person,
|
:from => self.person,
|
||||||
:into => aspect)
|
:into => aspect)
|
||||||
if request.save!
|
if request.save!
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ RSpec.configure do |config|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
module Resque
|
module Resque
|
||||||
def enqueue(klass, *args)
|
def enqueue(klass, *args)
|
||||||
true
|
true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue