Sha256: 585e00178e88d071ec75dfd54baca621bdcea8374069db99c24217aa4fdf53e1
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
ENV["RAILS_ENV"] ||= "test" require "rails/all" require "dummy/application" require "clearance/rspec" require "factory_bot_rails" require "rspec/rails" require "shoulda-matchers" require "timecop" Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } Dummy::Application.initialize! RSpec.configure do |config| config.include FactoryBot::Syntax::Methods config.infer_spec_type_from_file_location! config.order = :random config.use_transactional_fixtures = true config.expect_with :rspec do |expectations| expectations.syntax = :expect end config.mock_with :rspec do |mocks| mocks.syntax = :expect end config.before { restore_default_warning_free_config } require 'rails-controller-testing' config.include Rails::Controller::Testing::TestProcess config.include Rails::Controller::Testing::TemplateAssertions config.include Rails::Controller::Testing::Integration end Shoulda::Matchers.configure do |config| config.integrate do |with| with.test_framework :rspec with.library :action_controller with.library :active_model with.library :active_record end end def restore_default_warning_free_config Clearance.configuration = nil Clearance.configure { |config| config.rotate_csrf_on_sign_in = true } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
clearance-2.0.0 | spec/spec_helper.rb |
clearance-2.0.0.beta2 | spec/spec_helper.rb |