-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Background.feature is always nil #84
Comments
Thanks! |
In general, we've tried to keep the AST in the core from having circular references. Parent nodes know about their children, but not the other way around. I think the right fix here is to make a change in or around https://github.com/cucumber/cucumber/blob/master/lib/cucumber/formatter/legacy_api/adapter.rb so that the background object passed to the formatter still has that old API, but we don't need to let that leak into the core's AST. WDYT @tooky @brasmusson? |
I think avoiding circular references is the right thing to do, I only made the fix this way because the |
@brasmusson @mattwynne whatever you do - please keep in mind cucumber-attic/gherkin#12 |
Let's fix this in the |
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. |
As @e2 noted (cucumber/gherkin#334), the ast class for Background has an
attr_accessor
for:feature
, but since the#feature
is never set on the background object,#feature
is always nil. Therefore things likebackground.feature.name
in for instance#before_background
in formatter will not work.The text was updated successfully, but these errors were encountered: