spec/unit/loga_spec.rb in loga-2.2.0 vs spec/unit/loga_spec.rb in loga-2.3.0
- old
+ new
@@ -10,19 +10,21 @@
let(:options) { { service_name: 'hello_world_app' } }
let(:framework_options) { { format: 'gelf' } }
describe '.configure' do
it 'configures Loga' do
- expect(Loga::Configuration).to receive(:new).with(options, {}).and_call_original
+ allow(Loga::Configuration).to receive(:new).and_call_original
subject.configure(options)
+ expect(Loga::Configuration).to have_received(:new).with(options, {})
end
context 'when framework options provided' do
it 'configures Loga' do
- expect(Loga::Configuration)
- .to receive(:new).with(options, framework_options).and_call_original
+ allow(Loga::Configuration).to receive(:new).and_call_original
subject.configure(options, framework_options)
+ expect(Loga::Configuration).to have_received(:new)
+ .with(options, framework_options)
end
end
context 'when configure twice' do
before { subject.configure(options) }
@@ -59,9 +61,10 @@
end
end
context 'when Loga is configured' do
before { subject.configure(options) }
+
specify { expect(subject.logger).to be_kind_of(Logger) }
end
end
describe '.reset' do