Class: BladeRunner::TestResults::Pass
- Inherits:
-
Object
- Object
- BladeRunner::TestResults::Pass
- Defined in:
- lib/blade_runner/test_results.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(name, message) ⇒ Pass
constructor
A new instance of Pass.
- #message ⇒ Object
- #to_s(number = nil) ⇒ Object
Constructor Details
#initialize(name, message) ⇒ Pass
Returns a new instance of Pass.
70 71 72 73 |
# File 'lib/blade_runner/test_results.rb', line 70 def initialize(name, ) @name = name @message = end |
Instance Method Details
#message ⇒ Object
79 80 81 82 83 |
# File 'lib/blade_runner/test_results.rb', line 79 def unless @message.nil? "\n" + @message.gsub(/^/, "# ").chomp end end |
#to_s(number = nil) ⇒ Object
75 76 77 |
# File 'lib/blade_runner/test_results.rb', line 75 def to_s(number = nil) ["ok", number, @name, ].compact.join(" ") end |