Sha256: b73bc5792d26da39736eddde96f868a6824c4510db88efd4e4f9862ceeafef1a
Contents?: true
Size: 870 Bytes
Versions: 1
Compression:
Stored size: 870 Bytes
Contents
require 'spec_helper' describe Address do describe 'inspect_without_ignored_attributes' do let(:address) { Address.create } it do address.inspect_without_ignored_attributes.should_not match(/id:/) address.inspect_without_ignored_attributes.should_not match(/name:/) address.inspect_without_ignored_attributes.should_not match(/created_at:/) address.original_inspect.should match(/#<Address id: \d+, .* created_at: ".*", updated_at: ".*">/) address.inspect_without_ignored_attributes.should == "#<Address address: nil, city: nil, country: nil, postal_code: nil, state: nil>" end end describe 'inspect' do let(:address) { Address.create } it do address.inspect.should match(/{Address id: \d+, name: nil, address: nil, city: nil, state: nil, postal_code: nil, country: nil}/) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_record_ignored_attributes-0.0.1 | spec/inspect_spec.rb |