• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fast-programmer / outboxer / 14571123183

21 Apr 2025 09:30AM UTC coverage: 98.335% (+0.07%) from 98.261%
14571123183

Pull #272

github

web-flow
Merge ba354684e into d8ccd6fd4
Pull Request #272: Optimise EventCreatedJob.perform_async

69 of 69 new or added lines in 2 files covered. (100.0%)

1595 of 1622 relevant lines covered (98.34%)

6.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/spec/lib/outboxer/logger_spec.rb
1
require "rails_helper"
1✔
2

3
require "stringio"
1✔
4

5
module Outboxer
1✔
6
  RSpec.describe Logger do
1✔
7
    let(:output) { StringIO.new }
2✔
8
    let(:level) { "info" }
2✔
9
    let(:logger) { Logger.new(output, level: Logger.const_get(level.upcase)) }
2✔
10

11
    describe "logging" do
1✔
12
      it "logs messages with correct format" do
1✔
13
        message = "test message"
1✔
14
        logger.info { message }
2✔
15

16
        log_output = output.string
1✔
17
        log_lines = log_output.strip.split("\n")
1✔
18

19
        log_lines.each do |line|
1✔
20
          expect(line.length).to be <= 100
1✔
21
          expect(line).to match(
1✔
22
            /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z pid=\d+ tid=\w+ INFO: #{message}\n?/)
23
        end
24
      end
25
    end
26
  end
27
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc