From ae217d5816c766443c6e6737d04073f40614b564 Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Mon, 18 Feb 2008 20:20:51 -0800 Subject: extracted conditionals concerning the "externalizing" of relations under a join. --- spec/active_relation/relations/alias_spec.rb | 11 ++--------- spec/active_relation/relations/table_spec.rb | 6 ------ 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'spec/active_relation') 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 == [ -- cgit v1.2.3