Skip to content

Commit

Permalink
Fix filename substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
halostatue committed Jun 24, 2020
1 parent c032222 commit caeca62
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions spec/ldiff_spec.rb
Expand Up @@ -10,7 +10,7 @@
let(:output_diff_e) { read_fixture('-e') }
let(:output_diff_f) { read_fixture('-f') }
let(:output_diff_u) { read_fixture('-u') }
let(:output_diff_chef) { read_fixture('-u', base: 'output.diff.chef')}
let(:output_diff_chef) { read_fixture('-u', base: 'output.diff.chef') }

specify do
expect(run_ldiff('-u', left: 'old-chef', right: 'new-chef')).to eq(output_diff_chef)
Expand Down Expand Up @@ -54,14 +54,15 @@ def clean_data(data, flag)
def clean_output_timestamp(data)
data.gsub(
%r{
[-*+]{3}
\s
spec/fixtures/(\w+)
\s
^
[-+*]{3}
\s*
spec/fixtures/(\S+)
\s*
\d{4}-\d\d-\d\d
\s
\s*
\d\d:\d\d:\d\d(?:\.\d+)
\s
\s*
(?:[-+]\d{4}|Z)
}x,
'*** spec/fixtures/\1 0000-00-00 00:00:00.000000000 -0000'
Expand Down

0 comments on commit caeca62

Please sign in to comment.