Created
August 13, 2014 18:36
-
-
Save wh1tney/0a03c3a4974bbb70b9d8 to your computer and use it in GitHub Desktop.
Rails Test Environment
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
require "minitest/autorun" | |
require "mocha/setup" | |
require 'simplecov' | |
require 'capybara/dsl' | |
require 'capybara/rails' | |
SimpleCov.start | |
module TestHelper | |
include Capybara::DSL | |
def setup | |
DatabaseCleaner.strategy = :truncation | |
DatabaseCleaner.clean_with(:truncation) | |
DatabaseCleaner.start | |
end | |
def teardown | |
DatabaseCleaner.clean | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment