Sha256: c24d283205d72cae5cfb4dfbcf93cab12ebac572f6400849eaea40cd0543e166

Contents?: true

Size: 516 Bytes

Versions: 13

Compression:

Stored size: 516 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../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

13 entries across 13 versions & 1 rubygems

Version Path
cuke_modeler-2.1.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-2.0.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.5.1 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.5.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.4.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.3.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.2.1 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.2.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.1.1 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.1.0 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.0.4 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.0.3 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb
cuke_modeler-1.0.2 testing/rspec/spec/unit/shared/prepopulated_models_unit_specs.rb