summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-02-05 10:57:14 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2017-02-05 10:57:14 +0100
commitf5de8f159e9fb79ed523fcb41c4b062eeaf3f811 (patch)
tree73ee2f469f7f835ed822c373984f2e58776d36d0 /spec/support
parent6e1d675de97122a966b16b7b732b2b145bbfc201 (diff)
downloadgitlab-ce-api-fix-files.tar.gz
Ensure the right content is served for the build artifacts APIapi-fix-files
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/matchers/match_file.rb5
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