test/test-mireru.rb in mireru-0.1.3 vs test/test-mireru.rb in mireru-0.1.4

- old
+ new

@@ -46,20 +46,20 @@ mock(Dir).glob("*") { expected } files = @mireru.__send__(:files_from_arguments, arguments) assert_equal(files, expected) end - def test_files_from_arguments_deep_option_only - arguments = %w(--deep) + def test_files_from_arguments_recursive_option_only + arguments = %w(-R) expected = %w(dir1 file1 dir2 dir1/file1 dir1/file2 dir2/file1) mock(Dir).glob("**/*") { expected } files = @mireru.__send__(:files_from_arguments, arguments) assert_equal(files, expected) end - def test_files_from_arguments_deep_option_and_dir - arguments = %w(--deep dir1 file1 dir2) + def test_files_from_arguments_recursive_option_and_dir + arguments = %w(-R dir1 file1 dir2) expected_dir1 = %w(dir1/file1 dir1/file2) expected_dir2 = %w(dir2/file1) expected = [expected_dir1, "file1", expected_dir2].flatten mock(File).directory?("dir1") { true } mock(File).directory?("file1") { false } @@ -88,11 +88,11 @@ files = @mireru.__send__(:files_from_arguments, arguments) assert_equal(files, arguments) end def test_purge_option - arguments = %w(--deep -f ubuntu dir1 file1 dir2) - flag = @mireru.__send__(:purge_option, arguments, /\A(-d|--deep)\z/) + arguments = %w(-R -f ubuntu dir1 file1 dir2) + flag = @mireru.__send__(:purge_option, arguments, /\A(-R|--recursive)\z/) assert_not_nil(flag) assert_equal(%w(-f ubuntu dir1 file1 dir2), arguments) value = @mireru.__send__(:purge_option, arguments, /\A-f\z/, true) assert_equal("ubuntu", value) assert_equal(%w(dir1 file1 dir2), arguments)