Sha256: d7198423dca804e387a0b5fab14aa861eb4fe9f68c31840603c177dd0067c650

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

shared_examples 'a data grid' do
  let(:build_result) { instance.build }

  context 'preparing the grid' do
    subject { build_result.prepare_grid }
    it { should == [[nil, nil, nil], [nil, nil, nil]] }
  end

  context 'populating the grid' do
    subject { build_result.data_grid }
    it { should == [row_0, row_1] }
  end

  context 'totals' do
    subject { build_result }
    its(:column_totals) { should == column_totals }
    its(:row_totals) { should == row_totals }
    its(:grand_total) { should == grand_total }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pivot_table-0.2.0 spec/support/shared_examples_for_a_data_grid.rb