spec/logtail/logger_spec.rb in logtail-ruby-0.1.2 vs spec/logtail/logger_spec.rb in logtail-ruby-0.1.3
- old
+ new
@@ -159,11 +159,11 @@
expect(io.string).to start_with("{\"level\":\"info\",\"dt\":\"2016-09-01T12:00:00.000000Z\",\"message\":\"this is a test\"")
end
end
context "with the HTTP log device" do
- let(:io) { Logtail::LogDevices::HTTP.new("my_key") }
+ let(:io) { Logtail::LogDevices::HTTP.new("my_source_token") }
it "should use the PassThroughFormatter" do
expect(logger.formatter).to be_kind_of(Logtail::Logger::PassThroughFormatter)
end
end
@@ -187,10 +187,10 @@
end
end
describe "#formatter=" do
it "should not allow changing the formatter when the device is HTTP" do
- http_device = Logtail::LogDevices::HTTP.new("api_key")
+ http_device = Logtail::LogDevices::HTTP.new("source_token")
logger = Logtail::Logger.new(http_device)
expect { logger.formatter = ::Logger::Formatter.new }.to raise_error(ArgumentError)
end
it "should set the formatter" do