Sha256: c4d9247ac2589cdd9e3a21fb65611394f3bca628173bd4b6b1cb7a3e59829ed7

Contents?: true

Size: 484 Bytes

Versions: 2

Compression:

Stored size: 484 Bytes

Contents

require 'spec_helper'

shared_examples_for 'a prepopulated model' do

  # clazz must be defined by the calling file

  let(:model) { clazz.new }


  it 'can take text from which to populate itself' do
    expect(clazz.instance_method(:initialize).arity).to_not eq(0)
  end

  it 'will complain if given non-text input' do
    expect { clazz.new(:not_a_string) }.to raise_error(ArgumentError, 'Can only create models from Strings but was given a Symbol.')
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

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