Module: Assert::Result
- Defined in:
- lib/assert/result.rb
Defined Under Namespace
Classes: Backtrace, Base, Error, Fail, HaltingTestResultError, Ignore, Pass, Skip
Constant Summary collapse
- TestFailure =
raised by the “fail” context helper to break test execution
Class.new(HaltingTestResultError)
- TestSkipped =
raised by the “skip” context helper to break test execution
Class.new(HaltingTestResultError)
Class Method Summary collapse
Class Method Details
.new(data = nil) ⇒ Object
25 26 27 28 |
# File 'lib/assert/result.rb', line 25 def self.new(data = nil) data ||= {} types[data[:type]].new(data) end |
.types ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/assert/result.rb', line 15 def self.types @types ||= Hash.new{ |_h, _k| Base }.tap{ |hash| hash[:pass] = Pass hash[:fail] = Fail hash[:ignore] = Ignore hash[:skip] = Skip hash[:error] = Error }.freeze end |