diff --git a/spec/synvert/core/rewriter/instance_spec.rb b/spec/synvert/core/rewriter/instance_spec.rb index 6dce6cfa..5ed35606 100644 --- a/spec/synvert/core/rewriter/instance_spec.rb +++ b/spec/synvert/core/rewriter/instance_spec.rb @@ -13,7 +13,7 @@ module Synvert::Core it 'parses within_node' do scope = double - block = Proc.new {} + block = proc {} expect(Rewriter::WithinScope).to receive(:new) .with(instance, { type: 'send', message: 'create' }, { recursive: true }, &block) .and_return(scope) @@ -23,7 +23,7 @@ module Synvert::Core it 'parses with_node' do scope = double - block = Proc.new {} + block = proc {} expect(Rewriter::WithinScope).to receive(:new) .with(instance, { type: 'send', message: 'create' }, { recursive: true }, &block) .and_return(scope) @@ -33,7 +33,7 @@ module Synvert::Core it 'parses within_direct_node' do scope = double - block = Proc.new {} + block = proc {} expect(Rewriter::WithinScope).to receive(:new) .with(instance, { type: 'send', message: 'create' }, { recursive: false }, &block) .and_return(scope) @@ -43,7 +43,7 @@ module Synvert::Core it 'parses with_direct_node' do scope = double - block = Proc.new {} + block = proc {} expect(Rewriter::WithinScope).to receive(:new) .with(instance, { type: 'send', message: 'create' }, { recursive: false }, &block) .and_return(scope) @@ -53,7 +53,7 @@ module Synvert::Core it 'parses goto_node' do scope = double - block = Proc.new {} + block = proc {} expect(Rewriter::GotoScope).to receive(:new).with(instance, :caller, &block).and_return(scope) expect(scope).to receive(:process) instance.goto_node(:caller, &block) @@ -61,7 +61,7 @@ module Synvert::Core it 'parses if_exist_node' do condition = double - block = Proc.new {} + block = proc {} expect(Rewriter::IfExistCondition).to receive(:new) .with(instance, type: 'send', message: 'create', &block) .and_return(condition) @@ -71,7 +71,7 @@ module Synvert::Core it 'parses unless_exist_node' do condition = double - block = Proc.new {} + block = proc {} expect(Rewriter::UnlessExistCondition).to receive(:new) .with(instance, type: 'send', message: 'create', &block) .and_return(condition) @@ -81,7 +81,7 @@ module Synvert::Core it 'parses if_only_exist_node' do condition = double - block = Proc.new {} + block = proc {} expect(Rewriter::IfOnlyExistCondition).to receive(:new) .with(instance, type: 'send', message: 'create', &block) .and_return(condition)