Class: Result
- Inherits:
-
Object
- Object
- Result
- Defined in:
- lib/result.rb
Instance Attribute Summary collapse
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#response ⇒ Object
Returns the value of attribute response.
-
#succeeded ⇒ Object
Returns the value of attribute succeeded.
-
#testcase ⇒ Object
Returns the value of attribute testcase.
Instance Method Summary collapse
-
#honk_in(verbosity, index) ⇒ Object
honk out the errors message corresponding to the verbosity configuration the user took.
-
#initialize(testcase, response) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(testcase, response) ⇒ Result
Returns a new instance of Result.
5 6 7 8 9 10 |
# File 'lib/result.rb', line 5 def initialize(testcase, response) @succeeded = true @testcase = testcase @response = response @error_message = nil end |
Instance Attribute Details
#error_message ⇒ Object
Returns the value of attribute error_message.
3 4 5 |
# File 'lib/result.rb', line 3 def @error_message end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'lib/result.rb', line 3 def response @response end |
#succeeded ⇒ Object
Returns the value of attribute succeeded.
3 4 5 |
# File 'lib/result.rb', line 3 def succeeded @succeeded end |
#testcase ⇒ Object
Returns the value of attribute testcase.
3 4 5 |
# File 'lib/result.rb', line 3 def testcase @testcase end |
Instance Method Details
#honk_in(verbosity, index) ⇒ Object
honk out the errors message corresponding to the verbosity configuration the user took
13 14 15 16 |
# File 'lib/result.rb', line 13 def honk_in(verbosity, index) verbosity ||= "rspec" self.send(verbosity.to_sym, index) end |
#success? ⇒ Boolean
18 19 20 |
# File 'lib/result.rb', line 18 def success? return @succeeded end |