spec/unit/hanami/web/rack_logger_spec.rb in hanami-2.0.0.rc1 vs spec/unit/hanami/web/rack_logger_spec.rb in hanami-2.0.0
- old
+ new
@@ -51,10 +51,13 @@
subject.log_request(env, status, elapsed)
stream.rewind
actual = stream.read
- expect(actual).to include(%([#{app_name}] [INFO] [#{time}] #{verb} #{status} #{elapsed}ms #{ip} #{path} #{content_length} {"user"=>{"password"=>"[FILTERED]"}}))
+ expect(actual).to eql(<<~LOG)
+ [#{app_name}] [INFO] [#{time}] #{verb} #{status} #{elapsed}µs #{ip} #{path} #{content_length}
+ {"user"=>{"password"=>"[FILTERED]"}}
+ LOG
end
context "ip" do
it "takes into account HTTP proxy forwarding" do
env = Rack::MockRequest.env_for("/")