Class: ActiveSupport::TestCase
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- ActiveSupport::TestCase
- Includes:
- ActiveSupport::Testing::Assertions, ActiveSupport::Testing::FileFixtures
- Defined in:
- lib/test/unit/active_support.rb
Constant Summary collapse
- Assertion =
shoulda needs ActiveSupport::TestCase::Assertion, which is not set in test-unit 3
Test::Unit::AssertionFailedError
Instance Method Summary collapse
- #after_teardown ⇒ Object
- #before_setup ⇒ Object
-
#message(msg = nil, ending = nil, &default) ⇒ Object
rails 4.1 (action dispatch assertions) needs the ‘message’ method which is not defined in test-unit 3.
Instance Method Details
#after_teardown ⇒ Object
60 61 |
# File 'lib/test/unit/active_support.rb', line 60 def after_teardown end |
#before_setup ⇒ Object
56 57 |
# File 'lib/test/unit/active_support.rb', line 56 def before_setup end |
#message(msg = nil, ending = nil, &default) ⇒ Object
rails 4.1 (action dispatch assertions) needs the ‘message’ method which is not defined in test-unit 3
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/test/unit/active_support.rb', line 65 def (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? = "" else = "#{msg}.\n" end ending ||= "." "#{}#{default.call}#{ending}" end end |