Skip to content

Refactoring is giving a undefined method error #34

@sswaroopgupta

Description

@sswaroopgupta

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions