Sha256: 223ed340c1433e470b29c42ec1241c292a3e7892a26431d1e005a17252a21563

Contents?: true

Size: 953 Bytes

Versions: 7396

Compression:

Stored size: 953 Bytes

Contents

require 'test/unit/assertions'

module RSpec
  module Core
    # @private
    module TestUnitAssertionsAdapter
      include ::Test::Unit::Assertions

      # If using test/unit from Ruby core with Ruby 1.9+, it includes
      # MiniTest::Assertions by default. Note the upcasing of 'Test'.
      #
      # If the test/unit gem is being loaded, it will not include any minitest
      # assertions.
      #
      # Only if Minitest 5.x is included / loaded do we need to worry about
      # adding a shim for the new updates. Thus instead of checking on the
      # RUBY_VERSION we need to check ancestors.
      begin
        # MiniTest is 4.x.
        # Minitest is 5.x.
        if ancestors.include?(::Minitest::Assertions)
          require 'rspec/core/minitest_assertions_adapter'
          include ::RSpec::Core::MinitestAssertionsAdapter
        end
      rescue NameError
        # No-op. Minitest 5.x was not loaded.
      end
    end
  end
end

Version data entries

7,396 entries across 7,313 versions & 129 rubygems

Version Path
cvss-suite-1.0.0 vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.5.0.beta3 lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.5.0.beta2 lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.4.4 lib/rspec/core/test_unit_assertions_adapter.rb
simplenet-client-0.2.0 ./vendor/bundle/ruby/2.0.0/gems/rspec-core-3.4.2/lib/rspec/core/test_unit_assertions_adapter.rb
simplenet-client-0.2.0 ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.4.2/lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.4.3 lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.5.0.beta1 lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.4.2 lib/rspec/core/test_unit_assertions_adapter.rb
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.4.1 lib/rspec/core/test_unit_assertions_adapter.rb
rspec-core-3.4.0 lib/rspec/core/test_unit_assertions_adapter.rb
swift-pyrite-0.1.1 vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb
swift-pyrite-0.1.0 vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/rspec-core-3.2.3/lib/rspec/core/test_unit_assertions_adapter.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/rspec-core-3.2.3/lib/rspec/core/test_unit_assertions_adapter.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb