Class: Purobu::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/purobu/reporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#testObject (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_failObject



12
13
14
# File 'lib/purobu/reporter.rb', line 12

def report_fail
  puts "#{red("FAIL")} #{@test.name}"
end

#report_passObject



8
9
10
# File 'lib/purobu/reporter.rb', line 8

def report_pass
  puts "#{green("PASS")} #{@test.name}"
end