Sha256: 6216c406bf728eb0836f6a50bae04a496668596aaeabddc237d26c84e8155150

Contents?: true

Size: 944 Bytes

Versions: 9

Compression:

Stored size: 944 Bytes

Contents

# encoding: utf-8

describe Wice::TableColumnMatrix do
  let(:general_conditions){ 'conditions' }

  let(:table){ Wice::TableColumnMatrix.new }

  it 'should new' do
    expect(table.class).to eq(Wice::TableColumnMatrix)
  end

  it 'should add_condition' do

    table.add_condition('key', general_conditions)

    expect(table.conditions).to include(general_conditions)
  end

  it 'should set default_model_class' do

    table.default_model_class = Dummy

    expect(table.class).to eq(Wice::TableColumnMatrix)
  end

  it 'should get column' do

    table.default_model_class = Dummy

    expect(Dummy.columns).to include(table.get_column_by_model_class_and_column_name(Dummy, :name))
    expect(Dummy.columns).to include(table.get_column_in_default_model_class_by_column_name(:name))
  end

  it 'should get column not initialized' do

    expect { table.get_column_in_default_model_class_by_column_name(:name) }.to raise_error
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
wice_grid_ms-3.6.2 spec/wice/table_column_matrix_spec.rb
wice_grid_ms-3.6.1 spec/wice/table_column_matrix_spec.rb
wice_grid_ms-3.6.0 spec/wice/table_column_matrix_spec.rb
wice_grid-3.6.0 spec/wice/table_column_matrix_spec.rb
wice_grid-3.6.0.pre5 spec/wice/table_column_matrix_spec.rb
wice_grid-3.6.0.pre4 spec/wice/table_column_matrix_spec.rb
wice_grid-3.6.0.pre3 spec/wice/table_column_matrix_spec.rb
wice_grid-3.6.0.pre2 spec/wice/table_column_matrix_spec.rb
wice_grid-3.6.0.pre1 spec/wice/table_column_matrix_spec.rb