Created
March 18, 2016 10:45
-
-
Save gregblass/b886f79b0d8e2e2015af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Capybara.javascript_driver = :webkit | |
Capybara::Webkit.configure do |config| | |
config.block_unknown_urls | |
config.allow_url("lvh.me") | |
config.allow_url("*.lvh.me") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.clean_with(:deletion) | |
end | |
config.before(:each) do | |
DatabaseCleaner.strategy = :transaction | |
end | |
config.before(:each, js: true) do | |
DatabaseCleaner.strategy = :deletion | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end | |
config.after(:each) do | |
DatabaseCleaner.clean | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV['RAILS_ENV'] ||= 'test' | |
require File.expand_path('../../config/environment', __FILE__) | |
abort("The Rails environment is running in production mode!") if Rails.env.production? | |
require 'spec_helper' | |
require 'rspec/rails' | |
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } | |
Dir[Rails.root.join('spec/concerns/**/*.rb')].each { |f| require f } | |
RSpec.configure do |config| | |
config.infer_base_class_for_anonymous_controllers = false | |
config.infer_spec_type_from_file_location! | |
config.use_transactional_fixtures = false | |
config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
config.before(:each) do | |
reset_email | |
end | |
end | |
ActiveRecord::Migration.maintain_test_schema! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.expect_with :rspec do |expectations| | |
expectations.syntax = :expect | |
end | |
config.mock_with :rspec do |mocks| | |
mocks.syntax = :expect | |
mocks.verify_partial_doubles = true | |
end | |
config.example_status_persistence_file_path = "spec/examples.txt" | |
config.order = :random | |
#config.profile_examples = 10 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment