diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-15 14:36:15 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-15 14:36:15 -0700 |
commit | e460aa96ae9bd5f1a24d798b2d22984a54810c70 (patch) | |
tree | feecb3aa95be57016eb84cc5cdfb904f51df7a63 /spec/arel | |
parent | 62e36ebba05778b76b97386d5771d3aafd5c4782 (diff) | |
download | rails-e460aa96ae9bd5f1a24d798b2d22984a54810c70.tar.gz rails-e460aa96ae9bd5f1a24d798b2d22984a54810c70.tar.bz2 rails-e460aa96ae9bd5f1a24d798b2d22984a54810c70.zip |
Table#[] returns nil when table does not exist
Diffstat (limited to 'spec/arel')
-rw-r--r-- | spec/arel/table_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb index 5b68040aac..9c84b170a2 100644 --- a/spec/arel/table_spec.rb +++ b/spec/arel/table_spec.rb @@ -147,6 +147,13 @@ module Arel end end + describe 'when table does not exist' do + it 'returns nil' do + table = Table.new(:foooo) + table[:id].should be_nil + 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 |