Sha256: c50a53f98abd1f830631a49eb7258f95fb5d4e3892b5909aed435d4dc11e781d
Contents?: true
Size: 667 Bytes
Versions: 2
Compression:
Stored size: 667 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Arstotzka::Wrapper do describe 'yard' do describe '#wrap' do subject { described_class.new(clazz: clazz, type: type) } let(:clazz) { nil } let(:type) { nil } context 'when definning clazz' do let(:clazz) { Person } it 'returns the valued wrapped in a class' do expect(subject.wrap('John')).to eq(Person.new('John')) end end context 'when defing type' do let(:type) { :integer } it 'casts all values' do expect(subject.wrap(%w[10 20 30])).to eq([10, 20, 30]) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
arstotzka-1.0.3 | spec/integration/yard/arstotzka/wrapper_spec.rb |
arstotzka-1.0.2 | spec/integration/yard/arstotzka/wrapper_spec.rb |