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