mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-22 08:48:38 +02:00
Add specs for pidfile option
This commit is contained in:
@@ -13,6 +13,7 @@ describe Crono::CLI do
|
|||||||
expect(cli).to receive(:load_rails)
|
expect(cli).to receive(:load_rails)
|
||||||
expect(cli).to receive(:start_working_loop)
|
expect(cli).to receive(:start_working_loop)
|
||||||
expect(cli).to receive(:parse_options)
|
expect(cli).to receive(:parse_options)
|
||||||
|
expect(cli).to receive(:write_pid)
|
||||||
cli.run
|
cli.run
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -39,6 +40,11 @@ describe Crono::CLI do
|
|||||||
expect(cli.config.logfile).to be_eql "log/crono.log"
|
expect(cli.config.logfile).to be_eql "log/crono.log"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should set pidfile" do
|
||||||
|
cli.send(:parse_options, ["--pidfile", "tmp/pids/crono.0.log"])
|
||||||
|
expect(cli.config.pidfile).to be_eql "tmp/pids/crono.0.log"
|
||||||
|
end
|
||||||
|
|
||||||
it "should set daemonize" do
|
it "should set daemonize" do
|
||||||
cli.send(:parse_options, ["--daemonize"])
|
cli.send(:parse_options, ["--daemonize"])
|
||||||
expect(cli.config.daemonize).to be true
|
expect(cli.config.daemonize).to be true
|
||||||
|
|||||||
Reference in New Issue
Block a user