diff --git a/features/format.feature b/features/format.feature index 22bb0bc7..350ae064 100644 --- a/features/format.feature +++ b/features/format.feature @@ -403,11 +403,9 @@ Feature: Custom formats When we run "jrnl --export yaml -o {cache_dir}" with cache directory "exported_journal" Then cache directory "exported_journal" should contain the files """ - [ - "2020-08-29_entry-the-first.md", - "2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md", - "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" - ] + 2020-08-29_entry-the-first.md + 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md + 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md """ And the content of file "2020-08-29_entry-the-first.md" in cache directory "exported_journal" should be """ @@ -452,11 +450,9 @@ Feature: Custom formats When we run "jrnl --export yaml -o {cache_dir}" with cache directory "bug768" Then cache directory "bug768" should contain the files """ - [ - "2020-08-29_entry-the-first.md", - "2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md", - "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" - ] + 2020-08-29_entry-the-first.md + 2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md + 2020-09-24_the-third-entry-finally-after-weeks-without-writing.md """ And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in cache directory "bug768" should be """ diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py index d75aea64..cc713127 100644 --- a/features/steps/export_steps.py +++ b/features/steps/export_steps.py @@ -127,12 +127,12 @@ def create_directory(context, dir_name): @then( 'cache directory "{dir_name}" should contain the files {expected_files_json_list}' ) -def assert_dir_contains_files(context, dir_name, expected_files_json_list="[]"): +def assert_dir_contains_files(context, dir_name, expected_files_json_list=""): working_dir = os.path.join("features", "cache", dir_name) actual_files = os.listdir(working_dir) expected_files = context.text or expected_files_json_list - expected_files = json.loads(expected_files) + expected_files = expected_files.split("\n") # sort to deal with inconsistent default file ordering on different OS's actual_files.sort()