class ActiveSupport::TestCase
Constants
- Assertion
shoulda needs
ActiveSupport::TestCase::Assertion
, which is not set in test-unit 3
Public Instance Methods
after_teardown()
click to toggle source
# File lib/test/unit/active_support.rb, line 59 def after_teardown end
before_setup()
click to toggle source
# File lib/test/unit/active_support.rb, line 55 def before_setup end
message(msg=nil, ending=nil, &default)
click to toggle source
rails 4.1 (action dispatch assertions) needs the 'message' method which is not defined in test-unit 3
# File lib/test/unit/active_support.rb, line 64 def message(msg=nil, ending=nil, &default) lambda do msg = msg.call if msg.respond_to?(:call) msg = msg.to_s.chomp(".") unless msg.nil? if msg.nil? or msg.empty? custom_message = "" else custom_message = "#{msg}.\n" end ending ||= "." "#{custom_message}#{default.call}#{ending}" end end
Private Instance Methods
mu_pp(object)
click to toggle source
# File lib/test/unit/active_support.rb, line 79 def mu_pp(object) AssertionMessage.convert(object) end