Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created November 15, 2017 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoobbava/e197d468b7f8d8cc3e404fed9ced1b38 to your computer and use it in GitHub Desktop.
Save anoobbava/e197d468b7f8d8cc3e404fed9ced1b38 to your computer and use it in GitHub Desktop.
sample spec_helper
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