Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

build failure in cell_spec.rb #14

Open
boutil opened this issue Nov 10, 2016 · 1 comment
Open

build failure in cell_spec.rb #14

boutil opened this issue Nov 10, 2016 · 1 comment

Comments

@boutil
Copy link

boutil commented Nov 10, 2016

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.

terceiro added a commit to terceiro/text-table that referenced this issue Nov 15, 2016
Under RSpec 3, probably due to some change in the order that the specs
are executed and/or loaded, that variable ends up influencing
spec/cell_spec.rb, and making one test fail. Also, @table is never used
in spec/integration/*.rb

Fixes aptinio#14
@terceiro
Copy link

terceiro commented Nov 15, 2016

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants