spec/resources/usage_spec.rb in deepl-rb-2.2.4 vs spec/resources/usage_spec.rb in deepl-rb-2.3.0
- old
+ new
@@ -1,16 +1,16 @@
# frozen_string_literal: true
require 'spec_helper'
describe DeepL::Resources::Usage do
- subject { DeepL::Resources::Usage.new(3, 5, nil, nil) }
+ subject { described_class.new(3, 5, nil, nil) }
describe '#initialize' do
context 'When building a basic object' do
it 'should create a resource' do
- expect(subject).to be_a(DeepL::Resources::Usage)
+ expect(subject).to be_a(described_class)
end
it 'should assign the attributes' do
expect(subject.character_count).to eq(3)
expect(subject.character_limit).to eq(5)
@@ -20,10 +20,10 @@
expect(subject.quota_exceeded?).to be_falsey
end
end
context 'When building a quota exceeded object' do
- subject { DeepL::Resources::Usage.new(5, 5, nil, nil) }
+ subject { described_class.new(5, 5, nil, nil) }
it 'should exceed the quota' do
expect(subject.quota_exceeded?).to be_truthy
end
end