Sha256: e1b8d493513393961b8852a7a0d0b134cf566ef289a7c63fc8ce309b5c9aff26

Contents?: true

Size: 823 Bytes

Versions: 10

Compression:

Stored size: 823 Bytes

Contents

module RR
  module Adapters
    module MiniTest
      include RRMethods
      def self.included(mod)
        RR.trim_backtrace = true
        mod.class_eval do
          unless instance_methods.any? { |method_name| method_name.to_sym == :setup_with_rr }
            alias_method :setup_without_rr, :setup
            def setup_with_rr
              setup_without_rr
              RR.reset
            end
            alias_method :setup, :setup_with_rr

            alias_method :teardown_without_rr, :teardown
            def teardown_with_rr
              RR.verify
              teardown_without_rr
            end
            alias_method :teardown, :teardown_with_rr
          end
        end
      end

      def assert_received(subject, &block)
        block.call(received(subject)).call
      end
    end
  end
end

Version data entries

10 entries across 6 versions & 3 rubygems

Version Path
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
bitclust-core-0.5.1 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/adapters/minitest.rb
mcmire-rr-1.0.5.rc1 lib/rr/adapters/minitest.rb
rr-1.0.4 lib/rr/adapters/minitest.rb
rr-1.0.3 lib/rr/adapters/minitest.rb