diff options
author | Claire McQuin <claire@opscode.com> | 2013-10-24 12:31:01 -0700 |
---|---|---|
committer | Claire McQuin <claire@opscode.com> | 2013-10-29 16:12:36 -0700 |
commit | 4418bc0455fae1649037f4925acde1899743db77 (patch) | |
tree | b1d6951deda51b1c54b15caf1291cbb8670eb975 /spec/unit/runner_spec.rb | |
parent | 5ed9d0126414e7d7ffb5973c53dffb017043493f (diff) | |
download | ohai-4418bc0455fae1649037f4925acde1899743db77.tar.gz |
add exceptions to ohai/exception.rb
Diffstat (limited to 'spec/unit/runner_spec.rb')
-rw-r--r-- | spec/unit/runner_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/runner_spec.rb b/spec/unit/runner_spec.rb index fa621cc3..669d905c 100644 --- a/spec/unit/runner_spec.rb +++ b/spec/unit/runner_spec.rb @@ -69,12 +69,12 @@ describe Ohai::Runner, "run_plugin" do @plugin = klass.new(@ohai, "/tmp/plugins/thing.rb") end - it "should raise a NoAttributeError" do - expect { @runner.run_plugin(@plugin) }.to raise_error(Ohai::NoAttributeError) + it "should raise Ohai::Excpetions::AttributeNotFound" do + expect { @runner.run_plugin(@plugin) }.to raise_error(Ohai::Exceptions::AttributeNotFound) end it "should not run the plugin" do - expect { @runner.run_plugin(@plugin) }.to raise_error(Ohai::NoAttributeError) + expect { @runner.run_plugin(@plugin) }.to raise_error(Ohai::Exceptions::AttributeNotFound) @plugin.has_run?.should be_false end end @@ -251,10 +251,10 @@ describe Ohai::Runner, "run_plugin" do @plugin1, @plugin2 = @plugins end - it "should raise a DependencyCycleError" do - @runner.stub(:fetch_plugins).with(["thing"]).and_return([@plugin1]) - @runner.stub(:fetch_plugins).with(["other"]).and_return([@plugin2]) - expect { @runner.run_plugin(@plugin1) }.to raise_error(Ohai::DependencyCycleError) + it "should raise Ohai::Exceptions::DependencyCycle" do + @runner.stub(:fetch_providers).with(["thing"]).and_return([@plugin1]) + @runner.stub(:fetch_providers).with(["other"]).and_return([@plugin2]) + expect { @runner.run_plugin(@plugin1) }.to raise_error(Ohai::Exceptions::DependencyCycle) end end |