test/pelusa/analyzer_test.rb in pelusa-0.2.3 vs test/pelusa/analyzer_test.rb in pelusa-0.2.4
- old
+ new
@@ -3,11 +3,11 @@
module Pelusa
describe Analyzer do
describe '#analyze' do
describe 'with a multi-expression AST' do
before do
- @ast = """
+ @ast = Pelusa.to_ast """
class Foo
def bar
123
end
end
@@ -21,11 +21,11 @@
module Baz
def bar
2.7
end
end
- """.to_ast
+ """
lints = stub
@analyzer = Analyzer.new([Lint::LineRestriction], RubyReporter, "foo.rb")
end
@@ -38,16 +38,16 @@
end
end
describe 'with a single-expression AST' do
before do
- @ast = """
+ @ast = Pelusa.to_ast """
class Foo
def bar
123
end
end
- """.to_ast
+ """
lints = stub
@analyzer = Analyzer.new([Lint::LineRestriction], RubyReporter, "foo.rb")
end