Class: MiniTest::Unit::TestCase
Overview
Patch TestCase::before_setup to invoke ShouldSyntax, and inject the #msg and #otherwise helper.
Instance Method Summary collapse
- #before_setup(*a, &block) ⇒ Object
- #msg(string = nil) ⇒ Object
- #msg=(string) ⇒ Object
- #mts_before_setup ⇒ Object
- #otherwise(message) ⇒ Object
Instance Method Details
#before_setup(*a, &block) ⇒ Object
158 159 160 161 |
# File 'lib/minitest/should_syntax.rb', line 158 def before_setup(*a, &block) MiniTest::ShouldSyntax.init self mts_before_setup(*a, &block) end |
#msg(string = nil) ⇒ Object
163 164 165 166 |
# File 'lib/minitest/should_syntax.rb', line 163 def msg(string=nil) self.msg = string if string @msg end |
#msg=(string) ⇒ Object
168 169 170 |
# File 'lib/minitest/should_syntax.rb', line 168 def msg=(string) @msg = string end |
#mts_before_setup ⇒ Object
156 |
# File 'lib/minitest/should_syntax.rb', line 156 alias :mts_before_setup :before_setup |
#otherwise(message) ⇒ Object
172 173 174 |
# File 'lib/minitest/should_syntax.rb', line 172 def otherwise() msg end |