aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-02-18 20:20:51 -0800
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-02-18 20:20:51 -0800
commitae217d5816c766443c6e6737d04073f40614b564 (patch)
tree70fbc3c84e612c1f580e108fc30f50264a172fbb /spec
parent2a91d807538a4d39c5755fb83a5e9462e8056fa6 (diff)
downloadrails-ae217d5816c766443c6e6737d04073f40614b564.tar.gz
rails-ae217d5816c766443c6e6737d04073f40614b564.tar.bz2
rails-ae217d5816c766443c6e6737d04073f40614b564.zip
extracted conditionals concerning the "externalizing" of relations under a join.
Diffstat (limited to 'spec')
-rw-r--r--spec/active_relation/relations/alias_spec.rb11
-rw-r--r--spec/active_relation/relations/table_spec.rb6
2 files changed, 2 insertions, 15 deletions
diff --git a/spec/active_relation/relations/alias_spec.rb b/spec/active_relation/relations/alias_spec.rb
index a2deae2840..6c9724bb3d 100644
--- a/spec/active_relation/relations/alias_spec.rb
+++ b/spec/active_relation/relations/alias_spec.rb
@@ -7,16 +7,9 @@ module ActiveRelation
@alias_relation = Alias.new(@relation, :foo)
end
- describe '#prefix_for' do
- it "delegates to the underlying relation" do
- @alias_relation.prefix_for(@relation[:id]).should == :users
- end
- end
-
- describe '#aliased_prefix_for' do
+ describe '#alias' do
it "returns the alias" do
- @alias_relation.aliased_prefix_for(@relation[:id]).should == :foo
- @alias_relation.aliased_prefix_for(:does_not_exist).should be_nil
+ @alias_relation.alias.should == :foo
end
end
end
diff --git a/spec/active_relation/relations/table_spec.rb b/spec/active_relation/relations/table_spec.rb
index 13a9198447..a7b5b5f69b 100644
--- a/spec/active_relation/relations/table_spec.rb
+++ b/spec/active_relation/relations/table_spec.rb
@@ -52,12 +52,6 @@ module ActiveRelation
end
end
- describe '#aliased_prefix_for' do
- it "returns the table name" do
- @relation.aliased_prefix_for(@relation[:id]).should == :users
- end
- end
-
describe '#attributes' do
it 'manufactures attributes corresponding to columns in the table' do
@relation.attributes.should == [