Sha256: 871418c772c213d33214a35c2c99cd435d5e183acaa854eab6e8dd1ec3f02b9e
Contents?: true
Size: 938 Bytes
Versions: 17
Compression:
Stored size: 938 Bytes
Contents
shared_examples 'a unity response' do let(:attributes_hash) { FixtureLoader.load_yaml("attributes_hash.yml") } let(:no_attributes_hash) { FixtureLoader.load_yaml("no_attributes_hash.yml") } let(:date_string_hash) { FixtureLoader.load_yaml("date_string_hash.yml") } let(:date_hash) { FixtureLoader.load_yaml("date_hash.yml") } describe '#strip_attributes' do context 'when given nil' do it { expect(subject.send(:strip_attributes, nil)).to be_nil } end it 'recursively strips attribute keys off hashes' do expect(subject.send(:strip_attributes, attributes_hash)).to eq(no_attributes_hash) end end describe '#convert_dates_to_utc' do context 'when given nil' do it { expect(subject.send(:convert_dates_to_utc, nil)).to be_nil } end it 'recursively converts date strings' do expect(subject.send(:convert_dates_to_utc, date_string_hash)).to eq(date_hash) end end end
Version data entries
17 entries across 17 versions & 1 rubygems