How can I modify my zeus.json file to run rspec tests in an engine I am developing alongside my application?
My Rails app looks something like this:
/config
/engines
/engine <-- this is the engine I'm developing inside the parent app
/spec <-- here are the rspec tests
/custom_plan.rb
/zeus.json
Normally, I cd
into engines/engine and run rspec
to run the engine tests (it has a dummy app it runs against).
Running zeus init
in the top directory creates zeus.json and custom_plan.rb:
{
"command": "ruby -rubygems -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", "testrb"]}
}
}
}
}
}
require 'zeus/rails'
class CustomPlan < Zeus::Rails
# def my_custom_command
# # see https://github.com/burke/zeus/blob/master/docs/ruby/modifying.md
# end
end
Zeus.plan = CustomPlan.new
Then when I run zeus start
the test_helper start-up fails with
cannot load such file -- test_helper (LoadError)
My guess is because my specs are currently in engines/engine/spec and there is no "spec" folder in the parent app. I'd like to be able to update my custom_plan to run those tests instead. In lieu of that, I'd like to be able to create a separate plan and zeus.json inside the engine, but when I cd
into engines/engine and run zeus init, it still creates the config files at the root of the application, so I'm not sure how to get zeus "into" my engine.
Help appreciated.