mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-09 19:03:44 +02:00
Add option -e to set environment
This commit is contained in:
@@ -49,5 +49,10 @@ describe Crono::CLI do
|
||||
cli.send(:parse_options, ["--daemonize"])
|
||||
expect(cli.config.daemonize).to be true
|
||||
end
|
||||
|
||||
it "should set environment" do
|
||||
cli.send(:parse_options, ["--environment", "production"])
|
||||
expect(cli.config.environment).to be_eql("production")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,11 +3,13 @@ require "spec_helper"
|
||||
describe Crono::Config do
|
||||
describe "#initialize" do
|
||||
it "should initialize with default configuration options" do
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
@config = Crono::Config.new
|
||||
expect(@config.cronotab).to be Crono::Config::CRONOTAB
|
||||
expect(@config.logfile).to be Crono::Config::LOGFILE
|
||||
expect(@config.pidfile).to be Crono::Config::PIDFILE
|
||||
expect(@config.daemonize).to be false
|
||||
expect(@config.environment).to be_eql ENV["RAILS_ENV"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user