Sha256: c24a34ceede8b96ddbed6cee6817d49069e2c45d81544a8a0e50eff40e4eb4ba

Contents?: true

Size: 802 Bytes

Versions: 8

Compression:

Stored size: 802 Bytes

Contents

#--
#
# Author:: Kouhei Sutou
# Copyright::
#   * Copyright (c) 2011 Kouhei Sutou <kou@clear-code.com>
# License:: Ruby license.

require 'rr'
require 'test/unit'

module Test::Unit
  module RR
    VERSION = "1.0.1"

    module Adapter
      include ::RR::Adapters::RRMethods

      class << self
        def included(mod)
          ::RR.trim_backtrace = true
          mod.module_eval do
            setup :before => :prepend
            def setup_rr
              ::RR.reset
            end

            teardown :after => :append
            def teardown_rr
              ::RR.verify
            end
          end
        end
      end

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

  class TestCase
    include RR::Adapter
  end
end

Version data entries

8 entries across 4 versions & 2 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/test-unit-rr-1.0.1/lib/test/unit/rr.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/test-unit-rr-1.0.1/lib/test/unit/rr.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/test-unit-rr-1.0.1/lib/test/unit/rr.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/test-unit-rr-1.0.1/lib/test/unit/rr.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/test-unit-rr-1.0.1/lib/test/unit/rr.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/test-unit-rr-1.0.1/lib/test/unit/rr.rb
bitclust-core-0.5.1 vendor/bundle/ruby/1.9.1/gems/test-unit-rr-1.0.1/lib/test/unit/rr.rb
test-unit-rr-1.0.1 lib/test/unit/rr.rb