Commit 3a08814c018456a69a457498e43b241d8df5ed2f
1 parent
ca8b021f
Exists in
master
and in
21 other branches
Switched to SQLite for ActiveRecord tests
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
Gemfile
searchkick.gemspec
... | ... | @@ -24,6 +24,4 @@ Gem::Specification.new do |spec| |
24 | 24 | spec.add_development_dependency "bundler", "~> 1.3" |
25 | 25 | spec.add_development_dependency "rake" |
26 | 26 | spec.add_development_dependency "minitest", "~> 4.7" |
27 | - spec.add_development_dependency "activerecord" | |
28 | - spec.add_development_dependency "pg" | |
29 | 27 | end | ... | ... |
test/test_helper.rb
... | ... | @@ -59,9 +59,9 @@ else |
59 | 59 | ActiveRecord::Base.time_zone_aware_attributes = true |
60 | 60 | |
61 | 61 | # migrations |
62 | - ActiveRecord::Base.establish_connection :adapter => "postgresql", :database => "searchkick_test" | |
62 | + ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" | |
63 | 63 | |
64 | - ActiveRecord::Migration.create_table :products, :force => true do |t| | |
64 | + ActiveRecord::Migration.create_table :products do |t| | |
65 | 65 | t.string :name |
66 | 66 | t.integer :store_id |
67 | 67 | t.boolean :in_stock |
... | ... | @@ -74,11 +74,11 @@ else |
74 | 74 | t.timestamps |
75 | 75 | end |
76 | 76 | |
77 | - ActiveRecord::Migration.create_table :stores, :force => true do |t| | |
77 | + ActiveRecord::Migration.create_table :stores do |t| | |
78 | 78 | t.string :name |
79 | 79 | end |
80 | 80 | |
81 | - ActiveRecord::Migration.create_table :animals, :force => true do |t| | |
81 | + ActiveRecord::Migration.create_table :animals do |t| | |
82 | 82 | t.string :name |
83 | 83 | t.string :type |
84 | 84 | end | ... | ... |