Skip to content

Commit ae72bb6

Browse files
BurdetteLamarkou
andauthored
Update test/csv/csv-filter/test_csv_filter.rb
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
1 parent b5cdca6 commit ae72bb6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/csv/csv-filter/test_csv_filter.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,11 @@ def run_csv_filter(filepath, *cli_option_names)
4242

4343
# Return results for CLI-only option (or invalid option).
4444
def results_for_cli_option(option_name)
45-
output = ""
46-
error = ""
47-
Dir.mktmpdir do |dirpath|
48-
sym = option_name.to_sym
49-
filepath = csv_filepath("", dirpath, sym)
50-
output, error = run_csv_filter(filepath, [option_name])
45+
Tempfile.create(["csv-filter", ".csv"]) do |file|
46+
file.write(@input)
47+
file.close
48+
run_csv_filter(file.path, option_name)
5149
end
52-
[output, error]
5350
end
5451

5552
# Get and return the actual output from the API.

0 commit comments

Comments
 (0)