Module: RSpec::LogMatcher

Defined in:
lib/rspec/log_matcher.rb,
lib/rspec/log_matcher/matcher.rb

Defined Under Namespace

Classes: Error, Matcher

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure!(config) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/rspec/log_matcher.rb', line 10

def self.configure!(config)
  config.before(:each, type: :feature) do
    @log_file_position = File.new(Matcher::LOG_PATH).sysseek(0, IO::SEEK_END)
  end

  config.include ::RSpec::LogMatcher
end

Instance Method Details

#log(expected_logs) ⇒ Object



18
19
20
# File 'lib/rspec/log_matcher.rb', line 18

def log(expected_logs)
  Matcher.new(expected_logs, @log_file_position)
end