test/pelusa/lint/short_identifiers_test.rb in pelusa-0.2.1 vs test/pelusa/lint/short_identifiers_test.rb in pelusa-0.2.2

- old
+ new

@@ -20,9 +20,24 @@ analysis = @lint.check(klass) analysis.successful?.must_equal true end end + describe 'when the class contains short identifier from reserved list' do + it 'returns a SuccessAnalysis' do + klass = """ + class Foo + def initialize + id = 2 + pp id + end + end""".to_ast + + analysis = @lint.check(klass) + analysis.successful?.must_equal true + end + end + describe 'when the class contains a short identifier' do it 'returns a FailureAnalysis' do klass = """ class Foo def initialize