Skip to content

Commit

Permalink
Simplify mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Feb 26, 2024
1 parent 98f1f38 commit 16373c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/dotenv/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@
application.config.logger = ActiveSupport::Logger.new(StringIO.new)
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
allow(application.config.logger).to receive(:tagged).and_call_original

subject
expect(application.config.logger).to receive(:tagged).with("dotenv").and_call_original

expect(application.config.logger).to have_received(:tagged).with("dotenv")
subject
end

it "watches .env with Spring" do
Expand Down

0 comments on commit 16373c5

Please sign in to comment.