Sha256: 7300231d5608ecac38012f808710affcbbf67d13d5f4654d0eb679be77f2cea9
Contents?: true
Size: 688 Bytes
Versions: 2
Compression:
Stored size: 688 Bytes
Contents
require 'spec_helper' shared_examples_for 'a named model' do # clazz must be defined by the calling file let(:model) { clazz.new } it 'has a name' do expect(model).to respond_to(:name) end it 'can change its name' do expect(model).to respond_to(:name=) model.name = :some_name expect(model.name).to eq(:some_name) model.name = :some_other_name expect(model.name).to eq(:some_other_name) end describe 'abstract instantiation' do context 'a new named object' do let(:model) { clazz.new } it 'starts with no name' do expect(model.name).to be_nil end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cuke_modeler-1.0.1 | spec/unit/shared/named_models_unit_specs.rb |
cuke_modeler-1.0.0 | spec/unit/shared/named_models_unit_specs.rb |