test/pelusa/lint/short_identifiers_test.rb in pelusa-0.2.3 vs test/pelusa/lint/short_identifiers_test.rb in pelusa-0.2.4
- old
+ new
@@ -8,44 +8,44 @@
end
describe '#check' do
describe 'when the class contains no short identifiers' do
it 'returns a SuccessAnalysis' do
- klass = """
+ klass = Pelusa.to_ast """
class Foo
def initialize
foo = 3
end
- end""".to_ast
+ end"""
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 = """
+ klass = Pelusa.to_ast """
class Foo
def initialize
id = 2
pp id
end
- end""".to_ast
+ end"""
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 = """
+ klass = Pelusa.to_ast """
class Foo
def initialize
x = 2
end
- end""".to_ast
+ end"""
analysis = @lint.check(klass)
analysis.failed?.must_equal true
end
end