Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'capybara'
- require 'database_cleaner'
- require 'capybara/dsl'
- require 'capybara/poltergeist'
- Capybara.configure do |c|
- c.javascript_driver = :poltergeist
- c.default_driver = :poltergeist
- # c.app_host = "http://localhost:3000"
- end
- RSpec.configure do |config|
- #config.include(Capybara::Webkit::RspecMatchers, :type => :feature)
- config.include Capybara::DSL
- config.before(:suite) do
- DatabaseCleaner.strategy = :transaction
- DatabaseCleaner.clean_with(:truncation)
- end
- config.around(:each) do |example|
- DatabaseCleaner.cleaning do
- example.run
- end
- end
- config.filter_run :focus
- config.run_all_when_everything_filtered = true
- if config.files_to_run.one?
- config.default_formatter = 'doc'
- end
- config.profile_examples = 10
- config.order = :random
- Kernel.srand config.seed
- 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
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement