spec/api/api_spec.rb in deepl-rb-2.5.3 vs spec/api/api_spec.rb in deepl-rb-3.0.0
- old
+ new
@@ -1,16 +1,20 @@
+# Copyright 2018 Daniel Herzog
+# Use of this source code is governed by an MIT
+# license that can be found in the LICENSE.md file.
# frozen_string_literal: true
require 'spec_helper'
describe DeepL::API do
+ subject(:api) { described_class.new(configuration) }
+
let(:configuration) { DeepL::Configuration.new }
- subject { DeepL::API.new(configuration) }
describe '#initialize' do
- context 'When building an API object' do
- it 'should save the configuration' do
- expect(subject.configuration).to be(configuration)
+ context 'when building an API object' do
+ it 'saves the configuration' do
+ expect(api.configuration).to be(configuration)
end
end
end
end