Sha256: 58bc0a591f5295e30609c5d621210b5ae1cf33938a2d01dbef7645fd5b57652a
Contents?: true
Size: 814 Bytes
Versions: 42
Compression:
Stored size: 814 Bytes
Contents
# --- add this as spec/support/rr.rb --- # RR doesn't have support for RSpec 2. # # Source: <https://github.com/btakita/rr/issues#issue/45> require 'rr' module RR module Adapters module RSpec2 include RRMethods def setup_mocks_for_rspec RR.reset end def verify_mocks_for_rspec RR.verify end def teardown_mocks_for_rspec RR.reset end def have_received(method = nil) RR::Adapters::Rspec::InvocationMatcher.new(method) end end end end module RSpec module Core module MockFrameworkAdapter include RR::Adapters::RSpec2 end end end RSpec.configure do |config| config.mock_framework = RSpec::Core::MockFrameworkAdapter config.backtrace_clean_patterns.push(RR::Errors::BACKTRACE_IDENTIFIER) end
Version data entries
42 entries across 42 versions & 2 rubygems