Sha256: 7e4993a4fb6fd0ba311e24730b9e29f7af0c33f22a0515214963963834627f44
Contents?: true
Size: 720 Bytes
Versions: 13
Compression:
Stored size: 720 Bytes
Contents
require "#{File.dirname(__FILE__)}/../../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
13 entries across 13 versions & 1 rubygems