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

exception actions with no parameters cannot be taken #78

Closed
goatshriek opened this issue May 5, 2020 · 0 comments
Closed

exception actions with no parameters cannot be taken #78

goatshriek opened this issue May 5, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@goatshriek
Copy link
Owner

If a throw-exception action is defined with a constructor that does not take any parameters, then an Exception is raised when the take method is called on the ActionSpec instance. A simple example spec looks like:

name: "throw-exception"
constructor:
  name: "NoParamException"

Calling take on this results in this error:

2.7.1 :004 > spec.take                                                                                                                                                                                                          Traceback (most recent call last):
        7: from /home/angel/.rvm/gems/ruby-2.7.1/bin/ruby_executable_hooks:24:in `<main>'
        6: from /home/angel/.rvm/gems/ruby-2.7.1/bin/ruby_executable_hooks:24:in `eval'
        5: from /home/angel/.rvm/gems/ruby-2.7.1/bin/irb:23:in `<main>'
        4: from /home/angel/.rvm/gems/ruby-2.7.1/bin/irb:23:in `load'
        3: from /home/angel/.rvm/gems/ruby-2.7.1/gems/irb-1.2.4/exe/irb:11:in `<top (required)>'
        2: from (irb):4
        1: from /mnt/c/Users/reall/code/wrapture/lib/wrapture/action_spec.rb:69:in `take'
NoMethodError (undefined method `map' for nil:NilClass)
@goatshriek goatshriek added the bug Something isn't working label May 5, 2020
@goatshriek goatshriek self-assigned this May 5, 2020
goatshriek added a commit that referenced this issue May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant