Created
April 1, 2011 16:28
-
-
Save gregoriokusowski/898431 to your computer and use it in GitHub Desktop.
How to make Spork work with autotest and rspec. Using a sqlite3 in-memory db.
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
#how to set spork | |
require 'spork' | |
Spork.prefork do | |
#my old spec_helper.rb here ;) | |
end | |
Spork.each_run do | |
load_schema = lambda { | |
load "#{Rails.root.to_s}/db/schema.rb" # use db agnostic schema by default | |
# ActiveRecord::Migrator.up('db/migrate') # use migrations | |
} | |
silence_stream(STDOUT, &load_schema) | |
end |
Author
gregoriokusowski
commented
Apr 1, 2011
- add '--drb' to the .rspec file
- run 'spork' #not rake exec spork anymore ;P
- then run 'autotest'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment