diff --git a/spec/unit/provider/directory_spec.rb b/spec/unit/provider/directory_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/provider/directory_spec.rb
+++ b/spec/unit/provider/directory_spec.rb
@@ -47,6 +47,9 @@ describe Chef::Provider::Directory do
   end
 
   describe "scanning file security metadata on unix" do
+    before do
+      Chef::Platform.stub!(:windows?).and_return(false)
+    end
     let(:mock_stat) do
       cstats = mock("stats")
       cstats.stub!(:uid).and_return(500)
Stub windows detection in directory spec.