-
-
Save pecavalheiro/5b8a007e047d8e907ee7e905b9aa37d4 to your computer and use it in GitHub Desktop.
Zeus Test Console
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
| # frozen_string_literal: true | |
| require 'zeus/rails' | |
| class Pry::Pager | |
| def best_available | |
| NullPager.new(pry_instance.output) | |
| end | |
| end | |
| 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 |
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 -rrubygems -r./custom_plan -eZeus.go", | |
| "plan": { | |
| "boot": { | |
| "default_bundle": { | |
| "development_environment": { | |
| "prerake": {"rake": []}, | |
| "runner": ["r"], | |
| "console": ["c"], | |
| "server": ["s"], | |
| "generate": ["g"], | |
| "destroy": ["d"], | |
| "dbconsole": [] | |
| }, | |
| "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