RailsCasts Pro episodes are now free!

Learn more or hide this

pengpenglin's Profile

GitHub User: pengpenglin

Comments by

Avatar

I found that if I put --drb in both .rspec and GuardFile, there will be a warning that says "port is in use", so I move the --drb into GuardFile and left --color in .rspec, that warning is gone.

BTW, set :cli => "--color --format nested --fail-fast --drb" will makes the output of Rspec more readable and clear

Avatar

I just use Spork each_run method to reload model files that Ryan mentioned in this screencast.

Spork.each_run do
# This code will be run each time you run your specs.

# Reload all model files when run each spec
# otherwise there might be out-of-date testing
require 'rspec/rails'
Dir["#{Rails.root}/app/controllers//*.rb"].each do |controller|
load controller
end
Dir["#{Rails.root}/app/models/
/*.rb"].each do |model|
load model
end
end