This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RSpec::Checksum::Matchers Check if a String looks like a checksum produced by the given algorithm. | |
# https://gist.github.com/sshaw/df14f6f89860b2dbcfd2 | |
# | |
# Copyright (c) 2016 Skye Shaw. Released under the MIT License (https://opensource.org/licenses/MIT) | |
# | |
require "rspec/expectations" | |
RSpec::Matchers.define :be_a_checksum do | |
regex = /\A[0-9a-f]{32,128}\z/i | |
chars = { |
OlderNewer