Sha256: 0e1af4ba2060ee315b013e70a428c2997247e3042cd1a50f9e8c59a4236a3574

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

Contents

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


describe 'Row, Unit', :unit_test => true do

  let(:clazz) { CukeModeler::Row }
  let(:row) { clazz.new }


  describe 'common behavior' do

    it_should_behave_like 'a model'
    it_should_behave_like 'a sourced model'
    it_should_behave_like 'a parsed model'

  end


  describe 'unique behavior' do

    it 'has cells' do
      expect(row).to respond_to(:cells)
    end

    it 'can change its cells' do
      expect(row).to respond_to(:cells=)

      row.cells = :some_cells
      expect(row.cells).to eq(:some_cells)
      row.cells = :some_other_cells
      expect(row.cells).to eq(:some_other_cells)
    end


    describe 'abstract instantiation' do

      context 'a new row object' do

        let(:row) { clazz.new }


        it 'starts with no cells' do
          expect(row.cells).to eq([])
        end

      end

    end


    describe 'row output' do

      context 'from abstract instantiation' do

        let(:row) { clazz.new }


        it 'can output an empty row' do
          expect { row.to_s }.to_not raise_error
        end

      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cuke_modeler-2.1.0 testing/rspec/spec/unit/models/row_unit_spec.rb
cuke_modeler-2.0.0 testing/rspec/spec/unit/models/row_unit_spec.rb
cuke_modeler-1.5.1 testing/rspec/spec/unit/models/row_unit_spec.rb