module RSpec::Rails::TestUnitAssertionAdapter::ClassMethods

Public Instance Methods

assertion_method_names() click to toggle source

@api private

Returns the names of assertion methods that we want to expose to examples without exposing non-assertion methods in Test::Unit or Minitest.

# File lib/rspec/rails/adapters.rb, line 81
def assertion_method_names
  Test::Unit::Assertions.public_instance_methods.select{|m| m.to_s =~ /^(assert|flunk)/} +
    [:build_message]
end
define_assertion_delegators() click to toggle source

@api private

# File lib/rspec/rails/adapters.rb, line 87
        def define_assertion_delegators
          assertion_method_names.each do |m|
            class_eval "              def #{m}(*args, &block)
                assertion_delegator.send :#{m}, *args, &block
              end
", __FILE__, __LINE__ + 1
          end
        end