Sha256: e324dbc8285bf48626343962514acd85c71b0a98c9e8ba3aa125194717f637c1
Contents?: true
Size: 732 Bytes
Versions: 10
Compression:
Stored size: 732 Bytes
Contents
require 'rails_helper' describe LHS::Item do before(:each) do class SomeService < LHS::Service endpoint ':datastore/v2/:campaign_id/feedbacks' endpoint ':datastore/v2/feedbacks' end end let(:json) do load_json(:feedbacks) end let(:data) do LHS::Data.new(json, nil, SomeService) end let(:item) do data[0] end context 'item setter' do it 'sets the value for an existing attribute' do expect(item.name = 'Steve').to eq 'Steve' expect(item.name).to eq 'Steve' expect(item._raw[:name]).to eq 'Steve' end it 'sets things to nil' do item.name = 'Steve' expect(item.name = nil).to eq nil expect(item.name).to eq nil end end end
Version data entries
10 entries across 10 versions & 1 rubygems