text-table icon indicating copy to clipboard operation
text-table copied to clipboard

build failure in cell_spec.rb

Open boutil opened this issue 9 years ago • 1 comments

Hi,

running the specs with RSpec 3.5 gives a failure:

1) Text::Table::Cell should return correct column index
     Failure/Error: @table.text_table_rows.first.cells[2].column_index.should == 3

       expected: 3
            got: 2 (using ==)
     # ./spec/cell_spec.rb:20:in `block (2 levels) in <top (required)>'

See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840824

The reason is that the variable @table used is not the one defined in the before(:each) block, but the one constructed from the integration tests, with a,b,c,d, which doesn't have a special colspan value.

A possible easy workaround is just to rename the variable of this test to something like @tab or @t.

boutil avatar Nov 10 '16 06:11 boutil

This happens because on Debian we are using RSpec 3, and the test suite is not really ready for that. I just sent a PR (#15) that ports the test suite to RSpec 3.

terceiro avatar Nov 15 '16 22:11 terceiro