Sha256: f20a42c20d0ce3b18f276e202cd8633215d71eb80f3c74702ed7972aa5d6db51

Contents?: true

Size: 881 Bytes

Versions: 1

Compression:

Stored size: 881 Bytes

Contents

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

  context 'column headers' do
    subject { build_result.column_headers }
    it { should == column_headers }
  end

  context '1st column' do
    subject { build_result.columns[0] }
    its(:header) { should == column_headers[0] }
    its(:data) { should == column_0 }
    its(:total) { should == column_totals[0] }
  end

  context '2nd column' do
    subject { build_result.columns[1] }
    its(:header) { should == column_headers[1] }
    its(:data) { should == column_1 }
    its(:total) { should == column_totals[1] }
  end

  context '3rd column' do
    subject { build_result.columns[2] }
    its(:header) { should == column_headers[2] }
    its(:data) { should == column_2 }
    its(:total) { should == column_totals[2] }
  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_columns.rb