Sha256: 48d27cefd0cbcfb9948aed0b4741ca7d8c8b4dff3c9e23a13351774399aa9c86

Contents?: true

Size: 656 Bytes

Versions: 2

Compression:

Stored size: 656 Bytes

Contents

module Temporaries
  module Adapters
    class MiniTest < Base
      # For ruby <= 1.9.2, MiniTest is actually adapted via the
      # Test::Unit adapter.
      def self.install
        ::MiniTest::Unit::TestCase.class_eval do
          extend Extension
          include Values
          include Directory
        end
      end

      def before(&block)
        context.add_setup_hook {|tc| tc.instance_eval(&block) }
      end

      def after(&block)
        context.add_teardown_hook {|tc| tc.instance_eval(&block) }
      end

      module Extension
        def temporaries_adapter
          MiniTest.new(self)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
temporaries-0.2.0 lib/temporaries/adapters/mini_test.rb
temporaries-0.1.0 lib/temporaries/adapters/mini_test.rb