Sha256: 8966790d0ce0af1837955dcce53dfaa4db393155fde4d7181b5fdd8b622d7f7f
Contents?: true
Size: 931 Bytes
Versions: 1
Compression:
Stored size: 931 Bytes
Contents
require 'spy' module Spy if defined?(::MiniTest::Unit::TestCase) class MiniTestAdapter include API def after_teardown super Spy.teardown end end ::MiniTest::Unit::TestCase.send(:include, MiniTestAdapter) end if defined?(::Test::Unit::TestCase) && !(defined?(::MiniTest::Unit::TestCase) && (::Test::Unit::TestCase < ::MiniTest::Unit::TestCase)) && !(defined?(::MiniTest::Spec) && (::Test::Unit::TestCase < ::MiniTest::Spec)) class TestUnitAdapter include API def self.included(mod) mod.teardown :spy_teardown, :after => :append end def spy_teardown Spy.teardown end end ::Test::Unit::TestCase.send(:include, TestUnitAdapter) end class RspecAdapter include API def setup_mocks_for_rspec end def verify_mocks_for_rspec end def teardown_mocks_for_rspec Spy.teardown end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spy-0.4.0 | lib/spy/integration.rb |