lib/rspec/rails/adapters.rb in rspec-rails-3.4.2 vs lib/rspec/rails/adapters.rb in rspec-rails-3.5.0.beta1
- old
+ new
@@ -199,17 +199,29 @@
methods = ::RSpec::Rails::Assertions.
public_instance_methods.
select do |m|
m.to_s =~ /^(assert|flunk|refute)/
end
- methods + [:build_message]
+ methods + test_unit_specific_methods
end
def define_assertion_delegators
assertion_method_names.each do |m|
define_method(m.to_sym) do |*args, &block|
assertion_delegator.send(m.to_sym, *args, &block)
end
+ end
+ end
+
+ # Starting on Rails 4, Minitest is the default testing framework so no
+ # need to add TestUnit specific methods.
+ if ::Rails::VERSION::STRING >= '4.0.0'
+ def test_unit_specific_methods
+ []
+ end
+ else
+ def test_unit_specific_methods
+ [:build_message]
end
end
end
class AssertionDelegator