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

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