spec/resources/text_spec.rb in deepl-rb-2.5.3 vs spec/resources/text_spec.rb in deepl-rb-3.0.0
- old
+ new
@@ -1,20 +1,23 @@
+# 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::Resources::Text do
- subject { described_class.new('Target', 'es', nil, nil) }
+ subject(:text) { described_class.new('Target', 'es', nil, nil) }
describe '#initialize' do
- context 'When building a basic object' do
- it 'should create a resource' do
- expect(subject).to be_a(described_class)
+ context 'when building a basic object' do
+ it 'creates a resource' do
+ expect(text).to be_a(described_class)
end
- it 'should assign the attributes' do
- expect(subject.text).to eq('Target')
- expect(subject.detected_source_language).to eq('es')
+ it 'assigns the attributes' do
+ expect(text.text).to eq('Target')
+ expect(text.detected_source_language).to eq('es')
end
end
end
end