summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 31ca2a2b64e..f87c9a50f86 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -17,21 +17,14 @@ require 'email_spec'
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+# Use capybara-webkit
+Capybara.javascript_driver = :webkit
+
RSpec.configure do |config|
- # == Mock Framework
- #
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
- #
- # config.mock_with :mocha
- # config.mock_with :flexmock
- # config.mock_with :rr
config.mock_with :rspec
config.include LoginMacros
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
@@ -52,6 +45,12 @@ RSpec.configure do |config|
DatabaseCleaner.start
WebMock.disable_net_connect!(allow_localhost: true)
+
+ # !!! Observers disabled by default in tests
+ #
+ # Use next code to enable observers
+ # before(:each) { ActiveRecord::Base.observers.enable(:all) }
+ #
ActiveRecord::Base.observers.disable :all
end