diff --git a/spec/cocaine/command_line_spec.rb b/spec/cocaine/command_line_spec.rb index 27f823b..ab1aa37 100644 --- a/spec/cocaine/command_line_spec.rb +++ b/spec/cocaine/command_line_spec.rb @@ -152,7 +152,7 @@ end it "detects that the system is windows (mingw)" do - stub_os("mingw") + on_mingw! Cocaine::CommandLine.unix?.should be_false end diff --git a/spec/support/stub_os.rb b/spec/support/stub_os.rb index 3a7ef4d..4d43c35 100644 --- a/spec/support/stub_os.rb +++ b/spec/support/stub_os.rb @@ -7,6 +7,10 @@ def on_unix! stub_os('darwin11.0.0') end + def on_mingw! + stub_os('mingw') + end + def stub_os(host_string) # http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/ RbConfig::CONFIG.stubs(:[]).with('host_os').returns(host_string)