Skip to content

Instantly share code, notes, and snippets.

@jerelmiller
Created September 5, 2014 18:13
Show Gist options
  • Save jerelmiller/5f5681e05dae90f683b4 to your computer and use it in GitHub Desktop.
Save jerelmiller/5f5681e05dae90f683b4 to your computer and use it in GitHub Desktop.
Zeus Test Console
require 'zeus/rails'
class CustomPlan < Zeus::Rails
# def my_custom_command
# # see https://github.com/burke/zeus/blob/master/docs/ruby/modifying.md
# end
def default_bundle_with_test_env
::Rails.env = 'test'
ENV['RAILS_ENV'] = 'test'
default_bundle
end
def test_console
console
end
end
Zeus.plan = CustomPlan.new
{
"command": "ruby -rubygems -r./custom_plan -eZeus.go",
"plan": {
"boot": {
"default_bundle": {
"development_environment": {
"prerake": {"rake": []},
"console": ["c"],
"generate": ["g"]
},
"test_environment": {
"test_helper": {"test": ["rspec"]},
"test_console": ["tc"]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment