summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/nodejs_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/nodejs_spec.rb')
-rw-r--r--spec/unit/plugins/nodejs_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/plugins/nodejs_spec.rb b/spec/unit/plugins/nodejs_spec.rb
index 15a596af..286bdf77 100644
--- a/spec/unit/plugins/nodejs_spec.rb
+++ b/spec/unit/plugins/nodejs_spec.rb
@@ -29,6 +29,12 @@ describe Ohai::System, "plugin nodejs" do
@plugin.stub(:shell_out).with("node -v").and_return(mock_shell_out(0, @stdout, ""))
end
+ after(:each) do
+ if Ohai::NamedPlugin.send(:const_defined?, :Nodejs)
+ Ohai::NamedPlugin.send(:remove_const, :Nodejs)
+ end
+ end
+
it "should get the nodejs version from running node -v" do
@plugin.should_receive(:shell_out).with("node -v").and_return(mock_shell_out(0, @stdout, ""))
@plugin.run