diff options
Diffstat (limited to 'spec/unit/plugins/freebsd/platform_spec.rb')
-rw-r--r-- | spec/unit/plugins/freebsd/platform_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/plugins/freebsd/platform_spec.rb b/spec/unit/plugins/freebsd/platform_spec.rb index 798b1063..32f2138d 100644 --- a/spec/unit/plugins/freebsd/platform_spec.rb +++ b/spec/unit/plugins/freebsd/platform_spec.rb @@ -24,7 +24,13 @@ describe Ohai::System, "FreeBSD plugin platform" do @plugin = get_plugin("freebsd/platform") @plugin.stub(:shell_out).with("uname -s").and_return(mock_shell_out(0, "FreeBSD\n", "")) @plugin.stub(:shell_out).with("uname -r").and_return(mock_shell_out(0, "7.1\n", "")) - @plugin[:os] = "freebsd" + @plugin.stub(:collect_os).and_return(:freebsd) + end + + after(:each) do + if Ohai::NamedPlugin.send(:const_defined?, :Platform) + Ohai::NamedPlugin.send(:remove_const, :Platform) + end end it "should set platform to lowercased lsb[:id]" do |