Skip to content

Commit

Permalink
Got test:prepare to run any time we reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
nalanj committed Dec 10, 2011
1 parent ac6cbd6 commit ee07064
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/tconsole.rb
Expand Up @@ -40,10 +40,16 @@ def self.run_environment(write)
ENV["RAILS_ENV"] ||= "test"
$:.unshift("./test")

require "./config/application.rb"
::Rails.application
rescue Exception
puts "Error: Can't load your Rails environment. Are you sure you're in the root of a Rails project?"
#require "./config/application.rb"
#::Rails.application

require 'rake'
Rake.application.init
Rake.application.load_rakefile
Rake.application.invoke_task("test:prepare")
rescue Exception => e
puts "Error: Loading your environment failed."
puts " #{e.message}"
return false
end
end
Expand Down

0 comments on commit ee07064

Please sign in to comment.