Module: Waterpig::ExampleLogger

Defined in:
lib/waterpig/browser-integration.rb

Class Method Summary collapse

Class Method Details

.included(group) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/waterpig/browser-integration.rb', line 25

def self.included(group)
  group.before :all do
    Rails.logger.fatal do
      "Beginning #{group.description} (at #{group.location})"
    end
  end

  group.after :all do
    Rails.logger.fatal do
      "Finished #{group.description} (at #{group.location})"
    end
  end

  group.before :each do |example|
    Rails.logger.fatal do
      "Beginning step #{example.full_description} (at #{example.location})"
    end
  end

  group.after :each do |example|
    Rails.logger.fatal do
      "Finished step #{example.full_description} (at #{example.location})"
    end
  end
end