aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/unit/primitives
diff options
context:
space:
mode:
Diffstat (limited to 'spec/arel/unit/primitives')
-rw-r--r--spec/arel/unit/primitives/attribute_spec.rb2
-rw-r--r--spec/arel/unit/primitives/expression_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/arel/unit/primitives/attribute_spec.rb b/spec/arel/unit/primitives/attribute_spec.rb
index 890ac0e813..b341c6f88e 100644
--- a/spec/arel/unit/primitives/attribute_spec.rb
+++ b/spec/arel/unit/primitives/attribute_spec.rb
@@ -16,7 +16,7 @@ module Arel
describe '#bind' do
it "manufactures an attribute with the relation bound and self as an ancestor" do
- derived_relation = @relation.select(@relation[:id].eq(1))
+ derived_relation = @relation.where(@relation[:id].eq(1))
@attribute.bind(derived_relation).should == Attribute.new(derived_relation, @attribute.name, :ancestor => @attribute)
end
diff --git a/spec/arel/unit/primitives/expression_spec.rb b/spec/arel/unit/primitives/expression_spec.rb
index 8a990231f6..d398805fe2 100644
--- a/spec/arel/unit/primitives/expression_spec.rb
+++ b/spec/arel/unit/primitives/expression_spec.rb
@@ -14,7 +14,7 @@ module Arel
describe '#bind' do
it "manufactures an attribute with a rebound relation and self as the ancestor" do
- derived_relation = @relation.select(@relation[:id].eq(1))
+ derived_relation = @relation.where(@relation[:id].eq(1))
@expression.bind(derived_relation).should == Expression.new(@attribute.bind(derived_relation), "COUNT", nil, @expression)
end