diff options
Diffstat (limited to 'spec/engines')
7 files changed, 9 insertions, 9 deletions
diff --git a/spec/engines/memory/integration/joins/cross_engine_spec.rb b/spec/engines/memory/integration/joins/cross_engine_spec.rb index 5dc1a6cb99..091fd2ceda 100644 --- a/spec/engines/memory/integration/joins/cross_engine_spec.rb +++ b/spec/engines/memory/integration/joins/cross_engine_spec.rb @@ -24,7 +24,7 @@ module Arel .join(@photos) \ .on(@users[:id].eq(@photos[:user_id])) \ .project(@users[:name], @photos[:camera_id]) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, ['bryan', @adapter_returns_integer ? 6 : '6']), Row.new(relation, ['emilio', @adapter_returns_integer ? 42 : '42']) @@ -39,7 +39,7 @@ module Arel .join(@users) \ .on(@users[:id].eq(@photos[:user_id])) \ .project(@users[:name], @photos[:camera_id]) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, ['bryan', @adapter_returns_integer ? 6 : '6']), Row.new(relation, ['emilio', @adapter_returns_integer ? 42 : '42']) diff --git a/spec/engines/memory/unit/relations/join_spec.rb b/spec/engines/memory/unit/relations/join_spec.rb index ed5fe89ef0..9a475d817d 100644 --- a/spec/engines/memory/unit/relations/join_spec.rb +++ b/spec/engines/memory/unit/relations/join_spec.rb @@ -17,7 +17,7 @@ module Arel @relation1 \ .join(@relation2) \ .on(@relation1[:id].eq(@relation2[:id])) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [1, 'duck', 1, 'duck' ]), Row.new(relation, [2, 'duck', 2, 'duck' ]), diff --git a/spec/engines/memory/unit/relations/order_spec.rb b/spec/engines/memory/unit/relations/order_spec.rb index 9546449bfb..0d746bcd0a 100644 --- a/spec/engines/memory/unit/relations/order_spec.rb +++ b/spec/engines/memory/unit/relations/order_spec.rb @@ -14,7 +14,7 @@ module Arel it 'sorts the relation with the provided ordering' do @relation \ .order(@relation[:id].desc) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [3, 'goose']), Row.new(relation, [2, 'duck' ]), diff --git a/spec/engines/memory/unit/relations/project_spec.rb b/spec/engines/memory/unit/relations/project_spec.rb index 92ed9fa74b..3970a50129 100644 --- a/spec/engines/memory/unit/relations/project_spec.rb +++ b/spec/engines/memory/unit/relations/project_spec.rb @@ -14,7 +14,7 @@ module Arel it 'retains only the attributes that are provided' do @relation \ .project(@relation[:id]) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [1]), Row.new(relation, [2]), diff --git a/spec/engines/memory/unit/relations/skip_spec.rb b/spec/engines/memory/unit/relations/skip_spec.rb index 089db24cea..4cf6c020bc 100644 --- a/spec/engines/memory/unit/relations/skip_spec.rb +++ b/spec/engines/memory/unit/relations/skip_spec.rb @@ -14,7 +14,7 @@ module Arel it 'removes the first n rows' do @relation \ .skip(1) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [2, 'duck']), Row.new(relation, [3, 'goose']), diff --git a/spec/engines/memory/unit/relations/take_spec.rb b/spec/engines/memory/unit/relations/take_spec.rb index 16b99872c5..f74f1a74c8 100644 --- a/spec/engines/memory/unit/relations/take_spec.rb +++ b/spec/engines/memory/unit/relations/take_spec.rb @@ -14,7 +14,7 @@ module Arel it 'removes the rows after the first n' do @relation \ .take(2) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [1, 'duck']), Row.new(relation, [2, 'duck']), diff --git a/spec/engines/memory/unit/relations/where_spec.rb b/spec/engines/memory/unit/relations/where_spec.rb index b45c009d83..23aef5766e 100644 --- a/spec/engines/memory/unit/relations/where_spec.rb +++ b/spec/engines/memory/unit/relations/where_spec.rb @@ -14,7 +14,7 @@ module Arel it 'filters the relation with the provided predicate' do @relation \ .where(@relation[:id].lt(3)) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [1, 'duck']), Row.new(relation, [2, 'duck']), @@ -27,7 +27,7 @@ module Arel @relation \ .where(@relation[:id].gt(1)) \ .where(@relation[:id].lt(3)) \ - .let do |relation| + .tap do |relation| relation.call.should == [ Row.new(relation, [2, 'duck']) ] |