Created
November 15, 2017 16:45
-
-
Save anoobbava/e197d468b7f8d8cc3e404fed9ced1b38 to your computer and use it in GitHub Desktop.
sample spec_helper
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 'simplecov' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
SimpleCov.start | |
RSpec.configure do |config| | |
config.include Devise::Test::ControllerHelpers, type: :controller | |
config.expect_with :rspec do |expectations| | |
expectations.include_chain_clauses_in_custom_matcher_descriptions = true | |
end | |
config.mock_with :rspec do |mocks| | |
# Prevents you from mocking or stubbing a method that does not exist on | |
# a real object. This is generally recommended, and will default to | |
# `true` in RSpec 4. | |
mocks.verify_partial_doubles = true | |
end | |
ActiveRecord::Migration.maintain_test_schema! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment