spec/latest_spec.rb in latest-0.3.0 vs spec/latest_spec.rb in latest-0.4.0
- old
+ new
@@ -5,10 +5,10 @@
BIN = File.expand_path("../../bin/latest", __FILE__)
STABLE_VERSION_REGEX = /\d+(\.\d+)*/ # 11.2.123
PRE_VERSION_REGEX = /--pre \d+(\.\d+)*(.[a-z\.?\d]+)+/i # 0.1.23.beta.1
- DOWNLOADS_REGEX = /\(\d+ downloads\)/ # (10 downloads)
+ DOWNLOADS_REGEX = /\(\d+ downloads?\)/ # (10 downloads)
def assert_version_match(name, string, prerelease=false)
regex = Regexp.new("#{name} #{prerelease ? PRE_VERSION_REGEX : STABLE_VERSION_REGEX} #{DOWNLOADS_REGEX}")
string.strip.must_match regex
end