Class: Purobu::Reporter
- Inherits:
-
Object
- Object
- Purobu::Reporter
- Defined in:
- lib/purobu/reporter.rb
Instance Attribute Summary collapse
-
#test ⇒ Object
readonly
Returns the value of attribute test.
Instance Method Summary collapse
-
#initialize(test) ⇒ Reporter
constructor
A new instance of Reporter.
- #report_fail ⇒ Object
- #report_pass ⇒ Object
Constructor Details
#initialize(test) ⇒ Reporter
Returns a new instance of Reporter.
4 5 6 |
# File 'lib/purobu/reporter.rb', line 4 def initialize(test) @test = test end |
Instance Attribute Details
#test ⇒ Object (readonly)
Returns the value of attribute test.
3 4 5 |
# File 'lib/purobu/reporter.rb', line 3 def test @test end |
Instance Method Details
#report_fail ⇒ Object
12 13 14 |
# File 'lib/purobu/reporter.rb', line 12 def report_fail puts "#{red("FAIL")} #{@test.name}" end |
#report_pass ⇒ Object
8 9 10 |
# File 'lib/purobu/reporter.rb', line 8 def report_pass puts "#{green("PASS")} #{@test.name}" end |