Module: Assert::Result
- Defined in:
- lib/assert/result.rb
Defined Under Namespace
Classes: Backtrace, Base, Error, Fail, Ignore, Pass, Skip
Constant Summary collapse
- TestFailure =
raised by the ‘fail’ context helper to break test execution
Class.new(RuntimeError)
- TestSkipped =
raised by the ‘skip’ context helper to break test execution
Class.new(RuntimeError)
Class Method Summary collapse
Class Method Details
.new(data = nil) ⇒ Object
21 22 23 24 |
# File 'lib/assert/result.rb', line 21 def self.new(data = nil) data ||= {} self.types[data[:type]].new(data) end |
.types ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/assert/result.rb', line 11 def self.types @types ||= Hash.new{ |h, k| Base }.tap do |hash| hash[:pass] = Pass hash[:fail] = Fail hash[:ignore] = Ignore hash[:skip] = Skip hash[:error] = Error end.freeze end |