Created
May 9, 2013 19:21
-
-
Save huoxito/5549834 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'zeus/rails' | |
ROOT_PATH = File.expand_path(Dir.pwd) | |
ENV_PATH = File.expand_path('spec/dummy/config/environment.rb', __FILE__) | |
BOOT_PATH = File.expand_path('spec/dummy/config/boot', ROOT_PATH) | |
APP_PATH = File.expand_path('spec/dummy/config/application', ROOT_PATH) | |
class CustomPlan < Zeus::Rails | |
def test_environment | |
Bundler.require(:test) | |
::Rails.env = ENV['RAILS_ENV'] = 'test' | |
require APP_PATH | |
$rails_rake_task = 'yup' # lie to skip eager loading | |
::Rails.application.require_environment! | |
$rails_rake_task = nil | |
$LOAD_PATH.unshift ".", "./lib", "./test", "./spec" | |
end | |
end | |
Zeus.plan = CustomPlan.new |
This file contains hidden or 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
{ | |
"command": "ruby -rubygems -r./custom_plan -eZeus.go", | |
"plan": { | |
"boot": { | |
"default_bundle": { | |
"test_environment": { | |
"test_helper": {"test": ["rspec", "testrb"]} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment