diff options
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/match_file.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/matchers/match_file.rb b/spec/support/matchers/match_file.rb new file mode 100644 index 00000000000..d1888b3376a --- /dev/null +++ b/spec/support/matchers/match_file.rb @@ -0,0 +1,5 @@ +RSpec::Matchers.define :match_file do |expected| + match do |actual| + expect(Digest::MD5.hexdigest(actual)).to eq(Digest::MD5.hexdigest(File.read(expected))) + end +end |