Files
crono/spec/cli_spec.rb
Dzmitry Plashchynski 518160d5d9 Add Schedule
2015-03-03 15:11:19 +02:00

30 lines
612 B
Ruby

require "spec_helper"
require 'crono/cli'
class TestJob
def perform;end
end
describe Crono::CLI do
let(:cli) { Crono::CLI.instance }
describe "#run" 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)
cli.run
end
end
describe "#run_job" do
it "should run job in separate thread" do
thread = cli.send(:run_job, TestJob).join
expect(thread).to be_stop
end
end
describe "#start_working_loop" do
it "should start working loop"
end
end