From dfa520b9ab08522e10978f2ee3006ba42db418ba Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 18 Sep 2010 11:33:07 -0700 Subject: returning nil for tables that do not exist --- spec/arel/table_spec.rb | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'spec/arel/table_spec.rb') diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb index 5b68040aac..28fc95dec5 100644 --- a/spec/arel/table_spec.rb +++ b/spec/arel/table_spec.rb @@ -147,27 +147,11 @@ module Arel end end - ### FIXME: this seems like a bad requirement. - #describe 'when given an', Attribute do - # it "returns the attribute if the attribute is within the relation" do - # @relation[@relation[:id]].should == @relation[:id] - # end - - # it "returns nil if the attribtue is not within the relation" do - # another_relation = Table.new(:photos) - # @relation[another_relation[:id]].should be_nil - # end - #end - - #describe 'when given an', Expression do - # before do - # @expression = @relation[:id].count - # end - - # it "returns the Expression if the Expression is within the relation" do - # @relation[@expression].should be_nil - # end - #end + describe 'when table does not exist' do + it 'returns nil' do + @relation[:foooo].should be_nil + end + end end end end -- cgit v1.2.3