Sha256: 1f4edbe71d96bc37d0ce2b7cbf7448ffe2687fae5422f171aeb25cdb6cde85f0

Contents?: true

Size: 852 Bytes

Versions: 13

Compression:

Stored size: 852 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../spec_helper"

shared_examples_for 'a parsed model' do

  # clazz must be defined by the calling file

  let(:model) { clazz.new }


  it 'can access its original parsing data' do
    expect(model).to respond_to(:parsing_data)
  end

  it 'can change its parsing data' do
    expect(model).to respond_to(:parsing_data=)

    model.parsing_data = :some_parsing_data
    expect(model.parsing_data).to eq(:some_parsing_data)
    model.parsing_data = :some_other_parsing_data
    expect(model.parsing_data).to eq(:some_other_parsing_data)
  end


  describe 'abstract instantiation' do

    context 'a new parsed object' do

      let(:model) { clazz.new }


      it 'starts with no parsing data' do
        expect(model.parsing_data).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/parsed_models_unit_specs.rb
cuke_modeler-2.0.0 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.5.1 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.5.0 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.4.0 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.3.0 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.2.1 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.2.0 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.1.1 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.1.0 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.0.4 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.0.3 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb
cuke_modeler-1.0.2 testing/rspec/spec/unit/shared/parsed_models_unit_specs.rb