diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-19 13:57:21 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-19 13:57:21 -0700 |
commit | 518db17ca3dade07fc67b6044b63c826cefb1442 (patch) | |
tree | 6a472954f44bbfd2d38198c33517f76a75150785 /spec/arel | |
parent | 3eae3b08eef84237c201a2f7bfc5292dbbe6951c (diff) | |
download | rails-518db17ca3dade07fc67b6044b63c826cefb1442.tar.gz rails-518db17ca3dade07fc67b6044b63c826cefb1442.tar.bz2 rails-518db17ca3dade07fc67b6044b63c826cefb1442.zip |
renamed ion classes
Diffstat (limited to 'spec/arel')
-rw-r--r-- | spec/arel/unit/relations/delete_spec.rb (renamed from spec/arel/unit/relations/deletion_spec.rb) | 0 | ||||
-rw-r--r-- | spec/arel/unit/relations/group_spec.rb (renamed from spec/arel/unit/relations/grouping_spec.rb) | 6 | ||||
-rw-r--r-- | spec/arel/unit/relations/insert_spec.rb (renamed from spec/arel/unit/relations/insertion_spec.rb) | 12 | ||||
-rw-r--r-- | spec/arel/unit/relations/project_spec.rb (renamed from spec/arel/unit/relations/projection_spec.rb) | 16 | ||||
-rw-r--r-- | spec/arel/unit/relations/relation_spec.rb | 6 | ||||
-rw-r--r-- | spec/arel/unit/session/session_spec.rb | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/spec/arel/unit/relations/deletion_spec.rb b/spec/arel/unit/relations/delete_spec.rb index 46c2ec9143..46c2ec9143 100644 --- a/spec/arel/unit/relations/deletion_spec.rb +++ b/spec/arel/unit/relations/delete_spec.rb diff --git a/spec/arel/unit/relations/grouping_spec.rb b/spec/arel/unit/relations/group_spec.rb index 5f781727cf..a0147b9416 100644 --- a/spec/arel/unit/relations/grouping_spec.rb +++ b/spec/arel/unit/relations/group_spec.rb @@ -1,7 +1,7 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') module Arel - describe Grouping do + describe Group do before do @relation = Table.new(:users) @attribute = @relation[:id] @@ -10,7 +10,7 @@ module Arel describe '#to_sql' do describe 'when given a predicate' do it "manufactures sql with where clause conditions" do - Grouping.new(@relation, @attribute).to_sql.should be_like(" + Group.new(@relation, @attribute).to_sql.should be_like(" SELECT `users`.`id`, `users`.`name` FROM `users` GROUP BY `users`.`id` @@ -20,7 +20,7 @@ module Arel describe 'when given a string' do it "passes the string through to the where clause" do - Grouping.new(@relation, 'asdf').to_sql.should be_like(" + Group.new(@relation, 'asdf').to_sql.should be_like(" SELECT `users`.`id`, `users`.`name` FROM `users` GROUP BY asdf diff --git a/spec/arel/unit/relations/insertion_spec.rb b/spec/arel/unit/relations/insert_spec.rb index 10b70a2036..b983e545a4 100644 --- a/spec/arel/unit/relations/insertion_spec.rb +++ b/spec/arel/unit/relations/insert_spec.rb @@ -1,7 +1,7 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') module Arel - describe Insertion do + describe Insert do before do @relation = Table.new(:users) end @@ -9,7 +9,7 @@ module Arel describe '#to_sql' do it 'manufactures sql inserting data when given multiple rows' do pending 'it should insert multiple rows' - @insertion = Insertion.new(@relation, [@relation[:name] => "nick", @relation[:name] => "bryan"]) + @insertion = Insert.new(@relation, [@relation[:name] => "nick", @relation[:name] => "bryan"]) @insertion.to_sql.should be_like(" INSERT @@ -19,7 +19,7 @@ module Arel end it 'manufactures sql inserting data when given multiple values' do - @insertion = Insertion.new(@relation, @relation[:id] => "1", @relation[:name] => "nick") + @insertion = Insert.new(@relation, @relation[:id] => "1", @relation[:name] => "nick") @insertion.to_sql.should be_like(" INSERT @@ -30,7 +30,7 @@ module Arel describe 'when given values whose types correspond to the types of the attributes' do before do - @insertion = Insertion.new(@relation, @relation[:name] => "nick") + @insertion = Insert.new(@relation, @relation[:name] => "nick") end it 'manufactures sql inserting data' do @@ -44,7 +44,7 @@ module Arel describe 'when given values whose types differ from from the types of the attributes' do before do - @insertion = Insertion.new(@relation, @relation[:id] => '1-asdf') + @insertion = Insert.new(@relation, @relation[:id] => '1-asdf') end it 'manufactures sql inserting data' do @@ -59,7 +59,7 @@ module Arel describe '#call' do before do - @insertion = Insertion.new(@relation, @relation[:name] => "nick") + @insertion = Insert.new(@relation, @relation[:name] => "nick") end it 'executes an insert on the connection' do diff --git a/spec/arel/unit/relations/projection_spec.rb b/spec/arel/unit/relations/project_spec.rb index 3c6a092db5..2a4b690dd8 100644 --- a/spec/arel/unit/relations/projection_spec.rb +++ b/spec/arel/unit/relations/project_spec.rb @@ -1,7 +1,7 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') module Arel - describe Projection do + describe Project do before do @relation = Table.new(:users) @attribute = @relation[:id] @@ -9,7 +9,7 @@ module Arel describe '#attributes' do before do - @projection = Projection.new(@relation, @attribute) + @projection = Project.new(@relation, @attribute) end it "manufactures attributes associated with the projection relation" do @@ -20,7 +20,7 @@ module Arel describe '#to_sql' do describe 'when given an attribute' do it "manufactures sql with a limited select clause" do - Projection.new(@relation, @attribute).to_sql.should be_like(" + Project.new(@relation, @attribute).to_sql.should be_like(" SELECT `users`.`id` FROM `users` ") @@ -29,11 +29,11 @@ module Arel describe 'when given a relation' do before do - @scalar_relation = Projection.new(@relation, @relation[:name]) + @scalar_relation = Project.new(@relation, @relation[:name]) end it "manufactures sql with scalar selects" do - Projection.new(@relation, @scalar_relation).to_sql.should be_like(" + Project.new(@relation, @scalar_relation).to_sql.should be_like(" SELECT (SELECT `users`.`name` FROM `users`) AS `users` FROM `users` ") end @@ -41,7 +41,7 @@ module Arel describe 'when given a string' do it "passes the string through to the select clause" do - Projection.new(@relation, 'asdf').to_sql.should be_like(" + Project.new(@relation, 'asdf').to_sql.should be_like(" SELECT asdf FROM `users` ") end @@ -60,13 +60,13 @@ module Arel describe '#aggregation?' do describe 'when the projections are attributes' do it 'returns false' do - Projection.new(@relation, @attribute).should_not be_aggregation + Project.new(@relation, @attribute).should_not be_aggregation end end describe 'when the projections include an aggregation' do it "obtains" do - Projection.new(@relation, @attribute.sum).should be_aggregation + Project.new(@relation, @attribute.sum).should be_aggregation end end end diff --git a/spec/arel/unit/relations/relation_spec.rb b/spec/arel/unit/relations/relation_spec.rb index 78e391640e..77a787b840 100644 --- a/spec/arel/unit/relations/relation_spec.rb +++ b/spec/arel/unit/relations/relation_spec.rb @@ -62,7 +62,7 @@ module Arel describe '#project' do it "manufactures a projection relation" do @relation.project(@attribute1, @attribute2). \ - should == Projection.new(@relation, @attribute1, @attribute2) + should == Project.new(@relation, @attribute1, @attribute2) end describe "when given blank attributes" do @@ -136,7 +136,7 @@ module Arel describe '#group' do it 'manufactures a group relation' do - @relation.group(@attribute1, @attribute2).should == Grouping.new(@relation, @attribute1, @attribute2) + @relation.group(@attribute1, @attribute2).should == Group.new(@relation, @attribute1, @attribute2) end describe 'when given blank groupings' do @@ -160,7 +160,7 @@ module Arel it 'manufactures an insertion relation' do Session.start do record = {@relation[:name] => 'carl'} - mock(Session.new).create(Insertion.new(@relation, record)) + mock(Session.new).create(Insert.new(@relation, record)) @relation.insert(record).should == @relation end end diff --git a/spec/arel/unit/session/session_spec.rb b/spec/arel/unit/session/session_spec.rb index fbb2b7791b..7582aa35e1 100644 --- a/spec/arel/unit/session/session_spec.rb +++ b/spec/arel/unit/session/session_spec.rb @@ -32,7 +32,7 @@ module Arel describe Session::CRUD do before do - @insert = Insertion.new(@relation, @relation[:name] => 'nick') + @insert = Insert.new(@relation, @relation[:name] => 'nick') @update = Update.new(@relation, @relation[:name] => 'nick') @delete = Deletion.new(@relation) @read = @relation |