Able to set place of cronotab.rb

This commit is contained in:
Dzmitry Plashchynski
2015-03-03 18:56:29 +02:00
parent b301b95ae5
commit 9675fc3517
3 changed files with 25 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ describe Crono::CLI do
it "should try to initialize rails with #load_rails and start working loop" do
expect(cli).to receive(:load_rails)
expect(cli).to receive(:start_working_loop)
expect(cli).to receive(:parse_options)
cli.run
end
end
@@ -26,4 +27,11 @@ describe Crono::CLI do
describe "#start_working_loop" do
it "should start working loop"
end
describe "#parse_options" do
it "should set cronotab" do
cli.send(:parse_options, ["--cronotab", "/tmp/cronotab.rb"])
expect(Crono.config.cronotab).to be_eql "/tmp/cronotab.rb"
end
end
end