Sha256: db062015fa3312a1cdcd8e3867d45377caaeee00f1eacac6ac662e028a2b701c

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

require '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 with as a string' do
    expect(model.to_s).to be_a(String)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cuke_modeler-1.0.1 spec/unit/shared/stringifiable_models_unit_specs.rb
cuke_modeler-1.0.0 spec/unit/shared/stringifiable_models_unit_specs.rb