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

Transpec crashes on AWS.stub! #100

Closed
blkperl opened this issue Feb 16, 2015 · 2 comments
Closed

Transpec crashes on AWS.stub! #100

blkperl opened this issue Feb 16, 2015 · 2 comments

Comments

@blkperl
Copy link

blkperl commented Feb 16, 2015

$ ruby --version
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
$ transpec --version
3.0.7
$ cat spec/test_spec.rb

require 'aws-sdk'

AWS.stub!
$ transpec -s spec/test_spec.rb -f
Gathering the spec suite data...

Converting spec/test_spec.rb
/home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax/method_stub.rb:53:in `hash_arg?': undefined method `hash_type?' for nil:NilClass (NoMethodError)
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/converter.rb:92:in `process_method_stub'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax.rb:85:in `invoke_handler'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax.rb:69:in `dispatch_syntax'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax.rb:61:in `block in dispatch_node'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax.rb:59:in `each'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax.rb:59:in `find'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/syntax.rb:59:in `dispatch_node'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/converter.rb:42:in `block in process'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/astrolabe-1.3.0/lib/astrolabe/node.rb:237:in `block in visit_descendants'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/astrolabe-1.3.0/lib/astrolabe/node.rb:235:in `each'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/astrolabe-1.3.0/lib/astrolabe/node.rb:235:in `visit_descendants'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/astrolabe-1.3.0/lib/astrolabe/node.rb:224:in `each_node'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/converter.rb:40:in `process'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/base_rewriter.rb:33:in `rewrite'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/base_rewriter.rb:16:in `rewrite_file!'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/cli.rb:87:in `convert_spec'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/cli.rb:64:in `block in process'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/cli.rb:63:in `each'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/cli.rb:63:in `process'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/cli.rb:38:in `run'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/lib/transpec/cli.rb:19:in `run'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/gems/transpec-3.0.7/bin/transpec:7:in `<top (required)>'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/bin/transpec:23:in `load'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/bin/transpec:23:in `<main>'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
    from /home/vagrant/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
@blkperl blkperl changed the title undefined method `hash_type?' error undefined method `hash_type?' for nil:NilClass error Feb 16, 2015
@blkperl blkperl changed the title undefined method `hash_type?' for nil:NilClass error Transpec crashes on AWS.stub! Feb 16, 2015
@yujinakayama
Copy link
Owner

Thanks for the report. Released 3.0.8 with the fix.

@blkperl
Copy link
Author

blkperl commented Feb 18, 2015

Awesome! Thanks @yujinakayama

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

No branches or pull requests

2 participants