Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Commit

Permalink
Let's abstract that away again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Feb 3, 2012
1 parent 1b9742a commit ae8ae22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/cocaine/command_line_spec.rb
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions spec/support/stub_os.rb
Expand Up @@ -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)
Expand Down

0 comments on commit ae8ae22

Please sign in to comment.