We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9d921e commit 116c879Copy full SHA for 116c879
lib/fakefs/dir.rb
@@ -120,7 +120,11 @@ def self.open(string, &block)
120
end
121
122
def self.tmpdir
123
- '/tmp'
+ if OS.windows?
124
+ 'C:\Users\Admin\AppData\Local\Temp'
125
+ else
126
+ '/tmp'
127
+ end
128
129
130
def self.pwd
lib/fakefs/os.rb
@@ -0,0 +1,17 @@
1
+module OS
2
+ def OS.windows?
3
+ (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
4
5
+
6
+ def OS.mac?
7
+ (/darwin/ =~ RUBY_PLATFORM) != nil
8
9
10
+ def OS.unix?
11
+ !OS.windows?
12
13
14
+ def OS.linux?
15
+ OS.unix? and not OS.mac?
16
17
+end
0 commit comments