spec/shelly/cli/runner_spec.rb in shelly-0.0.37 vs spec/shelly/cli/runner_spec.rb in shelly-0.0.38

- old
+ new

@@ -1,10 +1,11 @@ require "spec_helper" require "shelly/cli/runner" describe Shelly::CLI::Runner do before do + ENV['SHELLY_DEBUG'] = "false" @runner = Shelly::CLI::Runner.new(%w(version --debug)) end describe "#initialize" do it "should initialize parent class" do @@ -19,11 +20,18 @@ describe "#debug?" do it "should be true if args include --debug option" do @runner.should be_debug end + + it "should be true if SHELLY_DEBUG is set to true" do + runner = Shelly::CLI::Runner.new + runner.should_not be_debug + ENV['SHELLY_DEBUG'] = "true" + runner.should be_debug + end - it "should be failse if args doesn't include --debug option" do + it "should be false if args doesn't include --debug option" do runner = Shelly::CLI::Runner.new(%w(version)) runner.should_not be_debug end end