tjgrathwell / rails5-spec-converter

A tool to upgrade Rails 4-style specs to Rails 5-style
MIT License
176 stars 14 forks source link

undefined method `match' for s(:send, nil, :sample_commit):Astrolabe::Node (NoMethodError) #2

Closed connorshea closed 8 years ago

connorshea commented 8 years ago

It crashes on spec/requests/api/repositories_spec.rb with the following:

/Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/text_transformer.rb:54:in `block in looks_like_route_definition?': undefined method `match' for s(:send, nil, :sample_commit):Astrolabe::Node (NoMethodError)
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/text_transformer.rb:50:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/text_transformer.rb:50:in `looks_like_route_definition?'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/text_transformer.rb:31:in `block in transform'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:245:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:246:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:246:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:246:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:246:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:246:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:246:in `block in visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `each'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:243:in `visit_descendants_with_types'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/astrolabe-1.3.1/lib/astrolabe/node.rb:226:in `each_node'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/text_transformer.rb:25:in `transform'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/cli.rb:9:in `block in run'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/cli.rb:7:in `glob'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/lib/rails5/spec_converter/cli.rb:7:in `run'
    from /Users/connor/.rvm/gems/ruby-2.2.4/gems/rails5-spec-converter-1.0.3/exe/rails5-spec-converter:6:in `<top (required)>'
    from /Users/connor/.rvm/gems/ruby-2.2.4/bin/rails5-spec-converter:23:in `load'
    from /Users/connor/.rvm/gems/ruby-2.2.4/bin/rails5-spec-converter:23:in `<main>'
    from /Users/connor/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
    from /Users/connor/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'
connorshea commented 8 years ago

Fixed by 1.0.4