Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

NoMethodError: undefined method `cell_matrix' for [...]:Cucumber::MultilineArgument::DataTable #729

Closed
wants to merge 21 commits into from

Conversation

tooky
Copy link
Member

@tooky tooky commented Sep 5, 2014

I've played with test for http://youtrack.jetbrains.com/issue/RUBY-11291 and found that it raises exception with 2.0.0.beta.2
NoMethodError: undefined method cell_matrix' for [{"type"=>"pending", "key"=>"FO-1"}]:Cucumber::MultilineArgument::DataTable ./features/step_definitions/ruby-11291.rb:5:in/^this table crashes:$/'
/Users/user/work/tests/cucumber-tests/features/ruby-11291.feature:3:in `Then this table crashes:'

I'm not sure if calling #diff! is still supported thus I've decided to file a ticket to discuss this.

@mattwynne
Copy link
Member

I would like the Cucumber::MultilineArgument::DataTable to support the existing API as much as possible.
@adbatista ported over the #diff! method in 0241b77, but it looks as though maybe there were some missing test-cases. Oh, in fact I can't see any tests in that particular commit... IIRC the old Ast::Table class was well tested so we can bring some of those back to life.

@os97673 os97673 added this to the 2.0 milestone Sep 1, 2014
@mattwynne mattwynne added the Bug label Sep 2, 2014
@adbatista
Copy link
Contributor

I will verify this e see any missing tests for #diff!

WIP Making sure the table that is passed to users in their step defs
conforms to the old API.

This object will decorate the new, very simple, Core::Ast::DataTable.

`cell_matrix` management is now happening here, and therefore all
methods that operate on the `cell_matrix` can be created here.
tooky referenced this pull request in cucumber/cucumber-ruby-core Sep 5, 2014
@mattwynne
Copy link
Member

@tooky and I were pairing on this and ran out of time so we just pushed ea7bde1 even though it's half-done.

We're just gradually porting over all the methods from the old Cucumber::Ast::Table class on the 1.3.x branch.

tooky and others added 16 commits September 12, 2014 10:47
@mattwynne - I decided to try to make this simplest to get to green, we
could make the old Table code just work to start with.

The diff tests are all based on to_s working...

I'm wondering if it's worth extracting that code out, and testing it
seperately?
still doesn't work. I think it needs tests!
Enables to_s to print diffed tables.

cc @mattwynne
This is ugly - I'm not seeing how to make it better. The two factory
methods work quite differently.

cc @mattwynne
This is a bit brittle, but probably ok as we'll be able to retire these
formatters soon...
@mattwynne
Copy link
Member

Weird. The wire protocol test that's failing is because it depends on to_s formatting the argument like an array. I wonder how this ever worked...

I don't use this feature myself, so I'm not familiar with it, but from
the look of this acceptance test, we were MUTATING THE AST OBJECT, THEN
RENDERING IT.

My head hurts.

I'm just printing the nice diff output in the exception now, which I
think reads better and also doesn't involve so much crazy coupling to
the AST / formatters.
@mattwynne mattwynne closed this in 5866b9d Sep 13, 2014
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
@mattwynne mattwynne deleted the 729-fix-data-table-api-for-step-defs branch May 1, 2021 05:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants