Sha256: 06d7af132a819b7f26426ed0ce90bec814ca54f4e493275b38f5b1bf76fe8bb3

Contents?: true

Size: 777 Bytes

Versions: 2

Compression:

Stored size: 777 Bytes

Contents

ENV['RAILS_ENV'] = 'test'

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/rails'
require 'invisible_captcha'

RSpec.configure do |config|
  config.disable_monkey_patching!
  config.order = :random
  config.expect_with :rspec
  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end
end

# Rails 4.2 call `initialize` inside `recycle!`. However Ruby 2.6 doesn't allow calling `initialize` twice.
# More info: https://github.com/rails/rails/issues/34790
if RUBY_VERSION >= "2.6.0" && Rails.version < "5"
  module ActionController
    class TestResponse < ActionDispatch::TestResponse
      def recycle!
        @mon_mutex_owner_object_id = nil
        @mon_mutex = nil
        initialize
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
invisible_captcha-0.12.2 spec/spec_helper.rb
invisible_captcha-0.12.1 spec/spec_helper.rb