Skip to content

Commit ed01928

Browse files
committed
Fix t.pattern test, it supports glob
1 parent cfa9397 commit ed01928

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/test_rake_test_task.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,24 @@ def test_libs_equals_empty
8282
end
8383

8484
def test_pattern_equals
85+
['gl.rb', 'ob.rb'].each do |f|
86+
create_file(f)
87+
end
8588
tt = Rake::TestTask.new do |t|
8689
t.pattern = '*.rb'
8790
end
88-
assert_equal ['*.rb'], tt.file_list.to_a
91+
assert_equal ['gl.rb', 'ob.rb'], tt.file_list.to_a
8992
end
9093

9194
def test_pattern_equals_test_files_equals
95+
['gl.rb', 'ob.rb'].each do |f|
96+
create_file(f)
97+
end
9298
tt = Rake::TestTask.new do |t|
9399
t.test_files = FileList['a.rb', 'b.rb']
94100
t.pattern = '*.rb'
95101
end
96-
assert_equal ['a.rb', 'b.rb', '*.rb'], tt.file_list.to_a
102+
assert_equal ['a.rb', 'b.rb', 'gl.rb', 'ob.rb'], tt.file_list.to_a
97103
end
98104

99105
def test_run_code_direct

0 commit comments

Comments
 (0)