Skip to content

Instantly share code, notes, and snippets.

@david
Created May 8, 2014 15:21
Show Gist options
  • Save david/e9a986ac11b9ef7a10cf to your computer and use it in GitHub Desktop.
Save david/e9a986ac11b9ef7a10cf to your computer and use it in GitHub Desktop.
require 'zeus/rails'
class CucumberPlan < Zeus::Rails
def cucumber_environment
require 'cucumber/rspec/disable_option_parser'
require 'cucumber/cli/main'
@cucumber_runtime = Cucumber::Runtime.new
end
def cucumber(argv=ARGV)
cucumber_main = Cucumber::Cli::Main.new(argv.dup)
had_failures = cucumber_main.execute!(@cucumber_runtime)
exit_code = had_failures ? 1 : 0
exit exit_code
end
end
Zeus.plan = CucumberPlan.new
{
"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": {
"cucumber_environment": {"cucumber": []},
"test_helper": {"test": ["rspec", "testrb"]}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment