Created
July 12, 2017 09:34
-
-
Save iGEL/82cd7f46cce177857038f3d583c8f780 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/rubocop/cop/style/lambda_call_spec.rb b/spec/rubocop/cop/style/lambda_call_spec.rb | |
index abbd89c..93d37b9 100644 | |
--- a/spec/rubocop/cop/style/lambda_call_spec.rb | |
+++ b/spec/rubocop/cop/style/lambda_call_spec.rb | |
@@ -61,5 +61,15 @@ describe RuboCop::Cop::Style::LambdaCall, :config do | |
new_source = autocorrect_source(['a.call(x)']) | |
expect(new_source).to eq('a.(x)') | |
end | |
+ | |
+ it 'auto-corrects x.call to x.()' do | |
+ new_source = autocorrect_source(['a.call']) | |
+ expect(new_source).to eq('a.()') | |
+ end | |
+ | |
+ it 'auto-corrects x.call asdf, x123 to x.(asdf, x123)' do | |
+ new_source = autocorrect_source(['a.call asdf, x123']) | |
+ expect(new_source).to eq('a.(asdf, x123)') | |
+ end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment