1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Move the relation "integration" specs to specs/relations

This commit is contained in:
Carl Lerche 2010-03-12 17:31:45 -08:00
parent c2f9f707fc
commit a33ab1b34e
2 changed files with 31 additions and 31 deletions

View file

@ -1,31 +0,0 @@
require 'spec_helper'
module Arel
describe "Relation" do
before :all do
@engine = Testing::Engine.new
@relation = Model.build do |r|
r.engine @engine
r.attribute :id, Attributes::Integer
r.attribute :name, Attributes::String
r.attribute :age, Attributes::Integer
end
end
describe "..." do
before :all do
@expected = (1..20).map { |i| @relation.insert([i, nil, 2 * i]) }
end
it_should_behave_like 'A Relation'
end
describe "#insert" do
it "inserts the row into the engine" do
@relation.insert([1, 'Foo', 10])
@engine.rows.should == [[1, 'Foo', 10]]
end
end
end
end

View file

@ -0,0 +1,31 @@
require 'spec_helper'
describe "Arel" do
before :all do
@engine = Arel::Testing::Engine.new
@relation = Arel::Model.build do |r|
r.engine @engine
r.attribute :id, Arel::Attributes::Integer
r.attribute :name, Arel::Attributes::String
r.attribute :age, Arel::Attributes::Integer
end
end
describe "Relation" do
before :all do
@expected = (1..20).map { |i| @relation.insert([i, nil, 2 * i]) }
end
it_should_behave_like 'A Relation'
end
describe "Relation" do
describe "#insert" do
it "inserts the row into the engine" do
@relation.insert([1, 'Foo', 10])
@engine.rows.should == [[1, 'Foo', 10]]
end
end
end
end