From f5de8f159e9fb79ed523fcb41c4b062eeaf3f811 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Sun, 5 Feb 2017 10:57:14 +0100 Subject: Ensure the right content is served for the build artifacts API --- spec/support/matchers/match_file.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 spec/support/matchers/match_file.rb (limited to 'spec/support') 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 -- cgit v1.2.1