aboutsummaryrefslogtreecommitdiffstats
path: root/spec/algebra/unit/relations/relation_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/algebra/unit/relations/relation_spec.rb')
-rw-r--r--spec/algebra/unit/relations/relation_spec.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb
index f4769526da..ec311d0c43 100644
--- a/spec/algebra/unit/relations/relation_spec.rb
+++ b/spec/algebra/unit/relations/relation_spec.rb
@@ -97,11 +97,20 @@ module Arel
end
it "manufactures a where relation" do
- @relation.where(@predicate).should == Where.new(@relation, [@predicate])
+ where = @relation.where(@predicate)
+ where.relation.should == @relation
+ where.predicates.should == [@predicate]
+ where.should be_kind_of Where
end
it "accepts arbitrary strings" do
- @relation.where("arbitrary").should == Where.new(@relation, ["arbitrary"])
+ where = @relation.where("arbitrary")
+ where.relation.should == @relation
+
+ where.predicates.length.should == 1
+ where.predicates.first.value.should == "arbitrary"
+
+ where.should be_kind_of Where
end
describe 'when given a blank predicate' do