-
Notifications
You must be signed in to change notification settings - Fork 43
2253-1 #179
base: master
Are you sure you want to change the base?
2253-1 #179
Changes from 1 commit
ab6456f
b69b59d
0d7de85
4f3bd83
7598c3e
19cf67e
144ea09
085963d
bf463f2
01276d2
fd22b25
c521d7c
0c3d9a4
7890e9c
bd82f66
625b481
a3c5e91
962779b
09fe24e
5cc5e5c
aae35e9
a98481c
cd7a86a
e56988d
5860b48
a6014b5
35450b3
10affeb
7ca09ff
8f8f3d8
e3b5935
8551d80
bf43352
1c03b6f
9f3f0e1
a9e0b5e
1260d9f
442cf61
6a07d69
ca2b1a4
3c7b6e8
285abe0
4d41b4c
a46494e
091c805
16f4252
0be4ee6
e104648
6a3fe89
91e555f
318811d
866ac1c
2f2b933
c13893b
d876128
5ffdd86
9fb42f6
5e28805
b8802af
2f381aa
6bbdc2f
68a07a7
8588cf8
23cf485
3314454
b7f7054
845a4a0
d01deb3
38a2442
b324786
133ce16
eaa1f33
5fefd19
81710ad
6117e4e
c4cfe52
a70d1bc
a8c121d
a0ef8ee
6d229bd
830cbf4
8272dd0
85b69dd
60f30f4
d5c4ade
6454d5f
61d5c5a
010dca3
5cd8a6f
6047b87
fd8dca1
cbb08dd
0bd0ca4
79eea7a
4edf28e
67a8d88
59ab1b9
40b1bd1
f5bae46
7f5e5e9
2ecf881
2760bb6
7f66061
52c0bd9
b0abb8b
d10f58d
8329c80
7fa83ff
e88d10b
e453089
cc653c4
c62a334
46ed271
10f114f
1050819
6ceb5fe
90423be
772578f
5a40382
8269a35
464945d
b22284f
4512926
dfc0aef
0b84da3
b0ba43d
42fb954
7e23db2
73fd4d1
ffb3e5e
c1e8cac
b6749fe
3cf3172
0788178
de3d8a1
6d96858
5cb7c47
7b5a9d8
5ebe714
22b6e81
4ac0a16
da7537b
370d655
6bd10e2
95467d2
15035eb
cd80220
4960d43
136ae1c
64edb48
31f0a31
7cd6866
f188d56
b7a5048
040f3b6
0d66177
dec30d7
b6310e1
6240d15
67ab697
57d1e02
d8a396d
9e2c25c
e0b8637
28d3d83
cabfb50
789d6ea
c4f48fc
0771e28
03d4cdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,26 +114,27 @@ def test_calling_method_missing_causes_the_no_method_error | |
|
||
# ------------------------------------------------------------------ | ||
|
||
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing | ||
# :nodoc: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop). |
||
class AllMessageCatcher | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop). |
||
# rubocop:disable MethodMissing | ||
# rubocop:disable Style/MissingRespondToMissing | ||
def method_missing(method_name, *args) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. |
||
"Someone called #{method_name} with <#{args.join(', ')}>" | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. |
||
# rubocop:enable Style/MissingRespondToMissing | ||
# rubocop:enable MethodMissing | ||
end | ||
# rubocop:enable Style/MissingRespondToMissing | ||
# rubocop:enable MethodMissingSuper | ||
|
||
# rubocop:disable Metrics/LineLength | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/EmptyLines: Extra blank line detected. |
||
def test_all_messages_are_caught | ||
catcher = AllMessageCatcher.new | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength. |
||
|
||
assert_equal 'Someone called foobar with <>', catcher.foobar | ||
assert_equal 'Someone called foobaz with <1>', catcher.foobaz(1) | ||
# rubocop:disable Metrics/LineLength | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength. |
||
assert_equal 'Someone called sum with <1, 2, 3, 4, 5, 6>', catcher.sum(1, 2, 3, 4, 5, 6) | ||
# rubocop:enable Metrics/LineLength | ||
end | ||
# rubocop:enable Metrics/LineLength | ||
|
||
def test_catching_messages_makes_respond_to_lie | ||
catcher = AllMessageCatcher.new | ||
|
@@ -146,20 +147,20 @@ def test_catching_messages_makes_respond_to_lie | |
|
||
# ------------------------------------------------------------------ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop). |
||
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing | ||
# :nodoc: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop). |
||
class WellBehavedFooCatcher | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop). |
||
# rubocop:disable MethodMissing | ||
# rubocop:disable Style/MissingRespondToMissing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop). |
||
def method_missing(method_name, *args, &block) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. |
||
if method_name.to_s[0, 3] == 'foo' | ||
'Foo to you too' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super. |
||
else | ||
super(method_name, *args, &block) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop). |
||
end | ||
end | ||
# rubocop:enable MethodMissing | ||
# rubocop:enable Style/MissingRespondToMissing | ||
end | ||
# rubocop:enable MethodMissingSuper | ||
# rubocop:enable Style/MissingRespondToMissing | ||
|
||
def test_foo_method_are_caught | ||
catcher = WellBehavedFooCatcher.new | ||
|
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.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).