This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
forked from woodchuck/activerecord-import
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rake test:oracle_enhanced running (but not passing :)
- Loading branch information
Steve Halasz
committed
May 27, 2011
1 parent
aa7dc7b
commit a05e49b
Showing
8 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ENV["ARE_DB"] = "oracle_enhanced" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require File.expand_path('../../test_helper', __FILE__) | ||
|
||
describe "#supports_imports?" do | ||
it "should support import" do | ||
assert ActiveRecord::Base.supports_import? | ||
end | ||
end | ||
|
||
describe "#import" do | ||
it "should import with a single insert" do | ||
# see ActiveRecord::ConnectionAdapters::AbstractAdapter test for more specifics | ||
assert_difference "Topic.count", +10 do | ||
result = Topic.import Build(3, :topics) | ||
assert_equal 1, result.num_inserts | ||
|
||
result = Topic.import Build(7, :topics) | ||
assert_equal 1, result.num_inserts | ||
end | ||
end | ||
end |