summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/lua_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/lua_spec.rb')
-rw-r--r--spec/unit/plugins/lua_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/plugins/lua_spec.rb b/spec/unit/plugins/lua_spec.rb
index 8dff19b6..80ee6400 100644
--- a/spec/unit/plugins/lua_spec.rb
+++ b/spec/unit/plugins/lua_spec.rb
@@ -30,6 +30,12 @@ describe Ohai::System, "plugin lua" do
@plugin.stub(:shell_out).with("lua -v").and_return(mock_shell_out(0, "", @stderr))
end
+ after(:each) do
+ if Ohai::NamedPlugin.send(:const_defined?, :Lua)
+ Ohai::NamedPlugin.send(:remove_const, :Lua)
+ end
+ end
+
it "should get the lua version from running lua -v" do
@plugin.should_receive(:shell_out).with("lua -v").and_return(mock_shell_out(0, "", @stderr))
@plugin.run