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

Refactoring is giving a undefined method error #34

Open
sswaroopgupta opened this issue Jul 26, 2016 · 3 comments
Open

Refactoring is giving a undefined method error #34

sswaroopgupta opened this issue Jul 26, 2016 · 3 comments
Labels

Comments

@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Jul 26, 2016

Expected Behavior
Refactoring should not give us an error

Actual Behavior
Getting the following error with parameter mismatch in step annotation and implementation.

Cannot perform refactoring: undefined method `children' for nil:NilClass 

Steps to replicate

  1. Create a spec
Specification Heading
=====================
ability to add product
----------------------
tags: shopping basket

* Add "product" to basket1
  1. Create an implementation with parameter mismatch
step 'Add <product> to basket1' do 
  puts product
  assert_equal(product, 'product')
  assert_equal(name, 'Gauge')
end
  1. refactor from the command line
gauge --refactor "Add \"product\" to basket1" "Add \"product\" to basket2"

getting the above error.

Version

Gauge version: 0.6.1.nightly-2016-07-25

Plugins
-------
csharp (0.9.1.nightly-2016-07-25)
html-report (2.1.1.nightly-2016-07-20)
java (0.5.1.nightly-2016-07-25)
ruby (0.3.1.nightly-2016-07-25)
@kaustavdm
Copy link
Contributor

Unable to reproduce this with latest HEAD. Could you try doing:

$ bundle
$ bundle exec gauge --refactor "Add \"product\" to basket1" "Add \"product\" to basket2"

@sswaroopgupta
Copy link
Contributor Author

sswaroopgupta commented Dec 15, 2016

This issue is still replicable
Cannot perform refactoring: undefined method `children' for nil:NilClass

Gauge version: 1.0.1.nightly-2018-07-31
Commit Hash: 4ae7c9a

Plugins
-------
ruby (0.5.2.nightly-2018-07-31)

@sswaroopgupta
Copy link
Contributor Author

With bundle exec gauge refactor "Add \"product\" to basket1" "Add \"product\" to basket2"

  • the spec file is not changed
  • In the implementation file step annotation text changes to Add instead of the entire text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants