From b9c50afcc8070c7cc0e5c79bd8b9d59c867b6b0c Mon Sep 17 00:00:00 2001 From: Lindsay Holmwood Date: Wed, 1 Jul 2009 01:23:54 +0200 Subject: [PATCH] added specs for setting the sandboxed check directory --- spec/worker_options_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/worker_options_spec.rb b/spec/worker_options_spec.rb index 7de8bdc03..bdc03b1a3 100644 --- a/spec/worker_options_spec.rb +++ b/spec/worker_options_spec.rb @@ -45,6 +45,24 @@ options.port.should == 11300 end + it "should accept a specified checks directory in short form" do + args = %w(-c /tmp) + options = Flapjack::WorkerOptions.parse(args) + options.checks_directory.should == "/tmp" + end + + it "should accept a specified checks directory in long form" do + args = %w(--checks-directory /tmp) + options = Flapjack::WorkerOptions.parse(args) + options.checks_directory.should == "/tmp" + end + + it "should set a default checks directory" do + args = [] + options = Flapjack::WorkerOptions.parse(args) + options.checks_directory.should_not be_nil + end + # general it "should exit on when asked for help in short form" do args = %w(-h)