Sha256: 55e53def1cbf21b19dbef0aa69045909a16e969f4fd5620f9cd7eac0999db598

Contents?: true

Size: 367 Bytes

Versions: 6

Compression:

Stored size: 367 Bytes

Contents

module LoggingTestHelper
  
  # used by tests
  def log_matches(regexp)
    result = false
    open(RAILS_ROOT + '/log/test.log') do |f|
      lines = f.readlines.to_s
      result = true if regexp.match(lines)
    end
    result
  end
  
  #used by specs
  def rails_log
    log = IO.read(RAILS_ROOT + '/log/test.log')
    log.should_not be_nil
    log 
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
radiant-0.6.5.1 test/helpers/logging_test_helper.rb
radiant-0.6.5 test/helpers/logging_test_helper.rb
radiant-0.6.7 test/helpers/logging_test_helper.rb
radiant-0.6.6 test/helpers/logging_test_helper.rb
radiant-0.6.8 test/helpers/logging_test_helper.rb
radiant-0.6.9 test/helpers/logging_test_helper.rb