-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
USe sqlite3 memory DB instead of tableless hack Inherit parents definitions unless over written
- Loading branch information
Chris Harper
committed
Oct 19, 2011
1 parent
7d9e8eb
commit d30a034
Showing
8 changed files
with
65 additions
and
85 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
source :rubygems | ||
|
||
gem 'rspec' | ||
gem 'activerecord' | ||
gem 'factory_girl' | ||
gem 'rake' | ||
|
||
group :test, :development do | ||
gem 'rspec' | ||
gem 'sqlite3' | ||
end | ||
|
||
|
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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
activemodel (3.0.4) | ||
activesupport (= 3.0.4) | ||
builder (~> 2.1.2) | ||
i18n (~> 0.4) | ||
activerecord (3.0.4) | ||
activemodel (= 3.0.4) | ||
activesupport (= 3.0.4) | ||
arel (~> 2.0.2) | ||
tzinfo (~> 0.3.23) | ||
activesupport (3.0.4) | ||
arel (2.0.9) | ||
builder (2.1.2) | ||
diff-lcs (1.1.2) | ||
factory_girl (1.3.3) | ||
i18n (0.5.0) | ||
rake (0.9.2) | ||
rspec (2.5.0) | ||
rspec-core (~> 2.5.0) | ||
rspec-expectations (~> 2.5.0) | ||
rspec-mocks (~> 2.5.0) | ||
rspec-core (2.5.1) | ||
rspec-expectations (2.5.0) | ||
activemodel (3.1.1) | ||
activesupport (= 3.1.1) | ||
builder (~> 3.0.0) | ||
i18n (~> 0.6) | ||
activerecord (3.1.1) | ||
activemodel (= 3.1.1) | ||
activesupport (= 3.1.1) | ||
arel (~> 2.2.1) | ||
tzinfo (~> 0.3.29) | ||
activesupport (3.1.1) | ||
multi_json (~> 1.0) | ||
arel (2.2.1) | ||
builder (3.0.0) | ||
diff-lcs (1.1.3) | ||
i18n (0.6.0) | ||
multi_json (1.0.3) | ||
rspec (2.7.0) | ||
rspec-core (~> 2.7.0) | ||
rspec-expectations (~> 2.7.0) | ||
rspec-mocks (~> 2.7.0) | ||
rspec-core (2.7.0) | ||
rspec-expectations (2.7.0) | ||
diff-lcs (~> 1.1.2) | ||
rspec-mocks (2.5.0) | ||
tzinfo (0.3.25) | ||
rspec-mocks (2.7.0) | ||
sqlite3 (1.3.4) | ||
tzinfo (0.3.30) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
activerecord | ||
factory_girl | ||
rake | ||
rspec | ||
sqlite3 |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module OnlyExpose | ||
VERSION = '0.0.1' | ||
VERSION = '0.0.2' | ||
end |
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 |
---|---|---|
@@ -1,8 +1,20 @@ | ||
require 'only_expose' | ||
require 'active_record' | ||
require 'factory_girl' | ||
|
||
load File.dirname(__FILE__) + '/support/models.rb' | ||
|
||
ActiveRecord::Base.establish_connection( | ||
:adapter => 'sqlite3', | ||
:database => ':memory:' | ||
) | ||
|
||
|
||
class SetupTables < ActiveRecord::Migration | ||
def change | ||
create_table :foos do |t| | ||
t.string :name | ||
t.string :address | ||
t.integer :age | ||
end | ||
end | ||
end | ||
SetupTables.new.migrate :up |
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