Sha256: 7e35843038450845b1fa7afb62842138f68d5e2f6ffb8747bcecd0ab3390ca20

Contents?: true

Size: 777 Bytes

Versions: 3

Compression:

Stored size: 777 Bytes

Contents

require "spec_helper"

describe RSpec::Rails::MinitestAssertionAdapter do
  include RSpec::Rails::MinitestAssertionAdapter

  RSpec::Rails::Assertions.public_instance_methods.select{|m| m.to_s =~ /^(assert|flunk|refute)/}.each do |m|
    if m.to_s == "assert_equal"
      it "exposes #{m} to host examples" do
        assert_equal 3,3
        expect do
          assert_equal 3,4
        end.to raise_error(ActiveSupport::TestCase::Assertion)
      end
    else
      it "exposes #{m} to host examples" do
        methods.should include(m)
      end
    end
  end

  it "does not expose internal methods of Minitest" do
    methods.should_not include("_assertions")
  end

  it "does not expose Minitest's message method" do
    methods.should_not include("message")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspec-rails-2.14.1 spec/rspec/rails/assertion_adapter_spec.rb
rspec-rails-3.0.0.beta1 spec/rspec/rails/assertion_adapter_spec.rb
rspec-rails-2.99.0.beta1 spec/rspec/rails/assertion_adapter_spec.rb