diff --git a/spec/integration/run_flag_spec.rb b/spec/integration/run_flag_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/run_flag_spec.rb
+++ b/spec/integration/run_flag_spec.rb
@@ -4,12 +4,20 @@ describe 'overcommit --run' do
   subject { shell(%w[overcommit --run]) }
 
   context 'when using an existing pre-commit hook script' do
+    if Overcommit::OS.windows?
+      let(:script_name) { 'test-script.exe' }
+      let(:script_contents) { 'exit 0' }
+    else
+      let(:script_name) { 'test-script' }
+      let(:script_contents) { "#!/bin/bash\nexit 0" }
+    end
+
     let(:config) do
       {
         'PreCommit' => {
           'MyHook' => {
             'enabled' => true,
-            'required_executable' => './test-script',
+            'required_executable' => "./#{script_name}",
           }
         }
       }
@@ -18,9 +26,9 @@ describe 'overcommit --run' do
     around do |example|
       repo do
         File.open('.overcommit.yml', 'w') { |f| f.puts(config.to_yaml) }
-        echo("#!/bin/bash\nexit 0", 'test-script')
-        `git add test-script`
-        FileUtils.chmod(0755, 'test-script')
+        echo(script_contents, script_name)
+        `git add #{script_name}`
+        FileUtils.chmod(0755, script_name)
         example.run
       end
     end
Use different script name and contents for Windows