Sha256: 0f7e52b23195b9367d354334ddcfd01bee79ea999c95e37e8955a5afc622db21
Contents?: true
Size: 665 Bytes
Versions: 11
Compression:
Stored size: 665 Bytes
Contents
require 'spec_helper' describe Restspec::Schema::Schema do Schema = Restspec::Schema::Schema it 'is only a bag for name and attributes that by default is a hash' do person_schema = Schema.new(:person) expect(person_schema.attributes).to eq({}) expect(person_schema.name).to eq(:person) end describe '#extend_with' do let(:schema) { Schema.new(:person) } before do schema.attributes['attribute'] = 'Attribute' end context 'using :without' do it 'removes an attribute' do schema.extend_with(without: ['attribute']) expect(schema.attributes).to_not have_key('attribute') end end end end
Version data entries
11 entries across 11 versions & 1 rubygems