Sha256: 1ab4e02d33900ba2424857267aba7e7d0b6dbf012a87280045a7b21d2c5089d9
Contents?: true
Size: 754 Bytes
Versions: 34
Compression:
Stored size: 754 Bytes
Contents
#frozen_string_literal = true package_require('ree_logger/appenders/rollbar_appender') RSpec.describe ReeLogger::RollbarAppender do let(:rollbar_appender) { described_class } let(:log_event) { ReeLogger::LogEvent.new( :info, "Some message", nil, {} ) } # comment "before" block to test sending to api before do allow(Rollbar).to receive(:log) end it "sends log event to Rollbar" do appender = rollbar_appender.new( :info, access_token: ENV['LOG_ROLLBAR_ACCESS_TOKEN'], environment: ENV['LOG_ROLLBAR_ENVIRONMENT'] ) expect(appender).to respond_to(:append) expect { appender.append(log_event) }.not_to raise_error expect(Rollbar).to have_received(:log) end end
Version data entries
34 entries across 34 versions & 1 rubygems