Sha256: 656d2c8fd794950fdfc49c13f66ac61e1d0e24112e2b1ba7f95c6570664d0b9c

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

shared_examples 'a collection of rows' do
  let(:build_result) { instance.build }
  specify { build_result.rows.length.should == 2 }

  context 'row headers' do
    subject { build_result.row_headers }
    it { should == row_headers }
  end

  context '1st row' do
    subject { build_result.rows[0] }
    its(:header) { should == row_headers[0] }
    its(:data) { should == row_0 }
    its(:total) { should == row_totals[0] }
  end

  context '2nd row' do
    subject { build_result.rows[1] }
    its(:header) { should == row_headers[1] }
    its(:data) { should == row_1 }
    its(:total) { should == row_totals[1] }
  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_collection_of_rows.rb