Skip to content

Commit ccf0369

Browse files
committed
fixup
1 parent 59da953 commit ccf0369

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/unit/watcher_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,19 +185,19 @@ def watcher_class
185185
end
186186
end
187187

188-
test "directories with same subpath" do
188+
test "root directories with a root subpath directory" do
189189
begin
190-
other_dir_1 = File.realpath(Dir.mktmpdir)
191-
# same subpath as other_dir_1 but with _other appended
192-
other_dir_2 = "#{other_dir_1}_other"
190+
other_dir_1 = "#{dir}_other"
191+
other_dir_2 = "#{dir}_core"
192+
# same subpath as dir but with _other or _core appended
193+
FileUtils::mkdir_p(other_dir_1)
193194
FileUtils::mkdir_p(other_dir_2)
194195
File.write("#{other_dir_1}/foo", "foo")
195196
File.write("#{other_dir_2}/foo", "foo")
196197
File.write("#{dir}/foo", "foo")
197198

198199
watcher.add "#{other_dir_1}/foo"
199200
watcher.add other_dir_2
200-
watcher.add "#{dir}/foo"
201201

202202
assert_equal [dir, other_dir_1, other_dir_2].sort, watcher.base_directories.sort
203203
ensure

0 commit comments

Comments
 (0)