-
-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor service wrapping #45
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
Conversation
| private | ||
|
|
||
| def private_call | ||
| puts "private_call" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| private | ||
|
|
||
| def private_call | ||
| puts "private_call" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| def not_call | ||
| puts "not call" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| define_method run_method do |*args| | ||
| begin | ||
| send(name, *args) | ||
| rescue ResultFailureError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not suppress exceptions.
|
|
||
| def after_each_method(*) | ||
| @@allowed_services.pop | ||
| @@allowed_services = nil if @@allowed_services.empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace class var @@allowed_services with a class instance var.
| # Confirm that this method call is allowed | ||
| raise_if_not_allowed | ||
|
|
||
| @@allowed_services ||= [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace class var @@allowed_services with a class instance var.
|
|
||
| def before_each_method(*) | ||
| @deps ||= [] | ||
| @@allowed_services ||= nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace class var @@allowed_services with a class instance var.
No description provided.