spec/algebra/unit/relations/relation_spec.rb in arel-1.0.0.rc1 vs spec/algebra/unit/relations/relation_spec.rb in arel-1.0.0
- old
+ new
@@ -95,9 +95,14 @@
before do
@predicate = Predicates::Equality.new(@attribute1, @attribute2)
end
it "manufactures a where relation" do
+ where = @relation.where("intern\nnet")
+ where.to_sql.should =~ /intern\nnet/
+ end
+
+ it "manufactures a where relation" do
where = @relation.where(@predicate)
where.relation.should == @relation
where.predicates.should == [@predicate]
where.should be_kind_of Where
end