spec/integration/yard/arstotzka/wrapper_spec.rb in arstotzka-1.0.4 vs spec/integration/yard/arstotzka/wrapper_spec.rb in arstotzka-1.1.0
- old
+ new
@@ -1,20 +1,20 @@
# frozen_string_literal: truie
describe Arstotzka::Wrapper do
- subject(:wrapper) { described_class.new(clazz: clazz, type: type) }
+ subject(:wrapper) { described_class.new(klass: klass, type: type) }
let(:type) { nil }
- let(:clazz) { nil }
+ let(:klass) { nil }
describe 'yard' do
describe '#wrap' do
- context 'when clazz is defined' do
- let(:clazz) { Person }
+ context 'when klass is defined' do
+ let(:klass) { Person }
let(:value) { 'john' }
- it 'wraps value with the clazz' do
+ it 'wraps value with the klass' do
expect(wrapper.wrap(value)).to eq(Person.new(value))
end
end
context 'when type is defined' do
@@ -26,10 +26,10 @@
end
end
context 'when type and class is defined' do
let(:type) { :string }
- let(:clazz) { Request }
+ let(:klass) { Request }
let(:value) { { 'key' => 'value' } }
let(:request) { wrapper.wrap(value) }
it 'returns a wrapped object' do
expect(request).to be_a(Request)