Class: ActiveSupport::TestCase
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- ActiveSupport::TestCase
- Includes:
- ActiveSupport::Testing::Assertions, ActiveSupport::Testing::FileFixtures, ActiveSupport::Testing::TaggedLogging
- 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
66 67 |
# File 'lib/test/unit/active_support.rb', line 66 def after_teardown end |
#before_setup ⇒ Object
62 63 |
# File 'lib/test/unit/active_support.rb', line 62 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
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/test/unit/active_support.rb', line 71 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 |