Sha256: 6691aa4858658d1ea173ea3439b37883cbb503f2ec83b6c88b25c65da3de97bf
Contents?: true
Size: 824 Bytes
Versions: 13
Compression:
Stored size: 824 Bytes
Contents
require "#{File.dirname(__FILE__)}/../../spec_helper" shared_examples_for 'a described model' do # clazz must be defined by the calling file let(:model) { clazz.new } it 'has a description' do expect(model).to respond_to(:description) end it 'can change its description' do expect(model).to respond_to(:description=) model.description = :some_description expect(model.description).to eq(:some_description) model.description = :some_other_description expect(model.description).to eq(:some_other_description) end describe 'abstract instantiation' do context 'a new described object' do let(:model) { clazz.new } it 'starts with no description' do expect(model.description).to be_nil end end end end
Version data entries
13 entries across 13 versions & 1 rubygems