Module: Test::Unit::Assertions
- Defined in:
- lib/test/unit/assertions.rb,
lib/test/unit/assertions.rb
Overview
deprecations
Class Method Summary collapse
Instance Method Summary collapse
-
#assert_nothing_raised(_ = :ignored) ⇒ Object
2009-06-01.
-
#build_message(user_message, template_message, *args) ⇒ Object
2009-06-01.
Class Method Details
.included(mod) ⇒ Object
22 23 24 |
# File 'lib/test/unit/assertions.rb', line 22 def self.included mod mod.send :include, Test::Unit::CRAP_ASSERTIONS end |
Instance Method Details
#assert_nothing_raised(_ = :ignored) ⇒ Object
2009-06-01
37 38 39 40 41 42 43 |
# File 'lib/test/unit/assertions.rb', line 37 def assert_nothing_raised _ = :ignored # 2009-06-01 self.class.tu_deprecation_warning :assert_nothing_raised self._assertions += 1 yield rescue => e raise Mini::Assertion, exception_details(e, "Exception raised:") end |
#build_message(user_message, template_message, *args) ⇒ Object
2009-06-01
45 46 47 48 49 50 51 |
# File 'lib/test/unit/assertions.rb', line 45 def (, , *args) # 2009-06-01 self.class.tu_deprecation_warning :build_message ||= '' += ' ' unless .empty? msg = .split(/<\?>/).zip(args.map { |o| o.inspect }) + msg.join end |