From 7032a50297fce4d7724d1735e81e5df5fd919e71 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 17 May 2009 14:31:04 -0400 Subject: reorganized file structures Conflicts: lib/arel.rb lib/arel/arel.rb lib/arel/engines/memory/predicates.rb lib/arel/engines/memory/relations/array.rb lib/arel/engines/sql/relations/table.rb --- spec/arel/integration/joins/with_adjacency_spec.rb | 2 +- spec/arel/integration/joins/with_aggregations_spec.rb | 4 ++-- spec/arel/integration/joins/with_compounds_spec.rb | 4 ++-- spec/arel/unit/relations/array_spec.rb | 7 +++++++ 4 files changed, 12 insertions(+), 5 deletions(-) (limited to 'spec') diff --git a/spec/arel/integration/joins/with_adjacency_spec.rb b/spec/arel/integration/joins/with_adjacency_spec.rb index fbac723e10..ffd6498749 100644 --- a/spec/arel/integration/joins/with_adjacency_spec.rb +++ b/spec/arel/integration/joins/with_adjacency_spec.rb @@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') module Arel describe Join do before do - @relation1 = Arel(:users) + @relation1 = Table(:users) @relation2 = @relation1.alias @predicate = @relation1[:id].eq(@relation2[:id]) end diff --git a/spec/arel/integration/joins/with_aggregations_spec.rb b/spec/arel/integration/joins/with_aggregations_spec.rb index 41978c0a5a..4aba005d51 100644 --- a/spec/arel/integration/joins/with_aggregations_spec.rb +++ b/spec/arel/integration/joins/with_aggregations_spec.rb @@ -3,8 +3,8 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') module Arel describe Join do before do - @relation1 = Arel(:users) - @relation2 = Arel(:photos) + @relation1 = Table(:users) + @relation2 = Table(:photos) @predicate = @relation1[:id].eq(@relation2[:user_id]) end diff --git a/spec/arel/integration/joins/with_compounds_spec.rb b/spec/arel/integration/joins/with_compounds_spec.rb index 7582c5fc83..41f04349b8 100644 --- a/spec/arel/integration/joins/with_compounds_spec.rb +++ b/spec/arel/integration/joins/with_compounds_spec.rb @@ -3,8 +3,8 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') module Arel describe Join do before do - @relation1 = Arel(:users) - @relation2 = Arel(:photos) + @relation1 = Table(:users) + @relation2 = Table(:photos) @predicate = @relation1[:id].eq(@relation2[:user_id]) end diff --git a/spec/arel/unit/relations/array_spec.rb b/spec/arel/unit/relations/array_spec.rb index 1330f0f205..c90843cd7d 100644 --- a/spec/arel/unit/relations/array_spec.rb +++ b/spec/arel/unit/relations/array_spec.rb @@ -22,6 +22,13 @@ module Arel { @relation[:id] => 3 } ] end + + it '' do + @relation.where(@relation[:id].lt(3)).call.should == [ + { @relation[:id] => 1 }, + { @relation[:id] => 2 } + ] + end end end end \ No newline at end of file -- cgit v1.2.3