Sha256: f1d3a2d469831eac00760960ec90019c8824490d356399a3228cea7ad1b338fe

Contents?: true

Size: 950 Bytes

Versions: 12

Compression:

Stored size: 950 Bytes

Contents

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(Wice::WiceGridException)
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
wice_grid-6.1.3 spec/wice/table_column_matrix_spec.rb
wice_grid-6.1.2 spec/wice/table_column_matrix_spec.rb
wice_grid-6.1.1 spec/wice/table_column_matrix_spec.rb
wice_grid-6.1.0 spec/wice/table_column_matrix_spec.rb
pwice_grid-7.0.0 spec/wice/table_column_matrix_spec.rb
pwice_grid-6.1.2 spec/wice/table_column_matrix_spec.rb
pwice_grid-6.1.1 spec/wice/table_column_matrix_spec.rb
pwice_grid-6.1.0 spec/wice/table_column_matrix_spec.rb
pwice_grid-5.0.2 spec/wice/table_column_matrix_spec.rb
pwice_grid-5.0.1 spec/wice/table_column_matrix_spec.rb
pwice_grid-5.0.0 spec/wice/table_column_matrix_spec.rb
wice_grid-4.1.0 spec/wice/table_column_matrix_spec.rb