Skip to content

Commit

Permalink
Merge 9024118 into 22ecfa4
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed Jan 30, 2021
2 parents 22ecfa4 + 9024118 commit 3c42c22
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/synvert/core/rewriter/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -53,15 +53,15 @@ 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)
end

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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 3c42c22

Please sign in to comment.