forked from mvz/memory_test_fix
/
README
51 lines (30 loc) · 1.05 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
MemoryTestFix
=============
A simple fix to run your Rails tests with sqlite. From the example at
http://blog.seagul.co.uk/articles/2006/02/08/in-memory-sqlite-database-for-rails-testing
Install the gem:
gem install memory_test_fix
In your config/environments.rb, use:
config.gem 'memory_test_fix'
In your database.yml, use:
test:
adapter: sqlite3
database: ":memory:"
It runs much faster!
You can also adjust the verbosity of the output:
test:
adapter: sqlite3
database: ":memory:"
verbosity: silent
You can also use this with other (testing) environments, not just 'test'.
== Rails Versions
The gem now uses Rails.env and friends, so will not work with Rails
versions below 2.3. If you're using an older version of Rails, use the
0.1.x version of this gem.
== Authors
Chris Roos
Adapted by Geoffrey Grosenbach, http://nubyonrails.com
Verbosity patch by Kakutani Shintaro
Adapted as GemPlugin by Matijs van Zuijlen
Support for environments besides 'test' by Erik Hanson & Matt Scilipoti
Support for Rails 3 by Greg Weber