spec/tty/table/operations/new_spec.rb in tty-0.0.9 vs spec/tty/table/operations/new_spec.rb in tty-0.0.10

- old
+ new

@@ -6,12 +6,12 @@ let(:object) { described_class } let(:row) { [1,2,3] } let(:table) { TTY::Table.new :rows => [row] } let(:callable) { Class.new do - def call(row, options) - row.map! { |r| r + 1} + def call(val, row, col) + val.value= val.value + 1 end end } let(:instance) { callable.new } @@ -24,9 +24,9 @@ it 'stores away operations' do expect(subject.operations[:alignment]).to include(instance) end it 'runs selected operations' do - subject.run_operations(:alignment, row) - expect(row).to eql([2,3,4]) + subject.run_operations(:alignment) + expect(table.data[0]).to eql([2,3,4]) end end