Sha256: c58332184659b780b1316be19cfe8f6135b1e0728687efc7494d44c0bc69367b

Contents?: true

Size: 820 Bytes

Versions: 2

Compression:

Stored size: 820 Bytes

Contents

require '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

2 entries across 2 versions & 1 rubygems

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