Sha256: aa6e85c8b823f91792aef18c3703118175384cfd38655625d06b1a8aa0586133
Contents?: true
Size: 448 Bytes
Versions: 6
Compression:
Stored size: 448 Bytes
Contents
require "#{File.dirname(__FILE__)}/../../spec_helper" shared_examples_for 'a stringifiable model' do # clazz must be defined by the calling file let(:model) { clazz.new } it 'can provide a custom string representation of itself' do expect(model.method(:to_s).owner).to equal(clazz), "#{clazz} does not override #to_s" end it 'represents itself as a string' do expect(model.to_s).to be_a(String) end end
Version data entries
6 entries across 6 versions & 1 rubygems