Skip to content

Commit 1b9742a

Browse files
author
Gabe Berke-Williams
committed
Refactor OS stubbing in tests.
1 parent a1de66e commit 1b9742a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎spec/cocaine/command_line_spec.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
end
153153

154154
it "detects that the system is windows (mingw)" do
155-
on_windows!("mingw")
155+
stub_os("mingw")
156156
Cocaine::CommandLine.unix?.should be_false
157157
end
158158

‎spec/support/stub_os.rb‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module StubOS
2-
def on_windows!(host_string = 'mswin')
3-
stub_os(host_string)
2+
def on_windows!
3+
stub_os('mswin')
44
end
55

6-
def on_unix!(host_string = 'darwin11.0.0')
7-
stub_os(host_string)
6+
def on_unix!
7+
stub_os('darwin11.0.0')
88
end
99

1010
def stub_os(host_string)

0 commit comments

Comments
 (0)