Class: Spec::Runner::Reporter

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

Instance Method Summary collapse

Instance Method Details

#end(*args) ⇒ Object

[View source]

41
42
43
44
45
# File 'lib/devcreek_specreporter.rb', line 41

def end(*args)
  result = old_end(*args)
  DevCreek::RSpecAdapter.instance().end
  return result
end

#example_failed(*args) ⇒ Object

[View source]

35
36
37
38
39
# File 'lib/devcreek_specreporter.rb', line 35

def example_failed(*args)
  result = old_example_failed(*args)
  DevCreek::RSpecAdapter.instance().example_failed(args[0].description,  @example_groups.last.description, @failures.last.expectation_not_met?) 
  return result
end

#example_finished(*args) ⇒ Object

[View source]

29
30
31
32
33
# File 'lib/devcreek_specreporter.rb', line 29

def example_finished(*args)
  result = old_example_finished(*args)
  DevCreek::RSpecAdapter.instance().example_finished(args[0].description, @example_groups.last.description) 
  return result
end

#example_started(*args) ⇒ Object

[View source]

23
24
25
26
27
# File 'lib/devcreek_specreporter.rb', line 23

def example_started(*args)
  result = old_example_started(*args)
  DevCreek::RSpecAdapter.instance().example_started(args[0].description, @example_groups.last.description) 
  return result
end

#old_endObject

[View source]

15
# File 'lib/devcreek_specreporter.rb', line 15

alias_method :old_end,  :end

#old_example_failedObject

[View source]

14
# File 'lib/devcreek_specreporter.rb', line 14

alias_method :old_example_failed,  :example_failed

#old_example_finishedObject

[View source]

13
# File 'lib/devcreek_specreporter.rb', line 13

alias_method :old_example_finished,  :example_finished

#old_example_startedObject

[View source]

12
# File 'lib/devcreek_specreporter.rb', line 12

alias_method :old_example_started,  :example_started

#old_startObject

[View source]

11
# File 'lib/devcreek_specreporter.rb', line 11

alias_method :old_start,  :start

#start(*args) ⇒ Object

[View source]

17
18
19
20
21
# File 'lib/devcreek_specreporter.rb', line 17

def start(*args)
  result = old_start(*args)
  DevCreek::RSpecAdapter.instance().start 
  return result
end