Sha256: 5437dafed6615516c893ab126358857294dadfeeb18a5a78f1adcef52be3fdfe
Contents?: true
Size: 800 Bytes
Versions: 1
Compression:
Stored size: 800 Bytes
Contents
# -*- coding: utf-8 -*- require 'minitest/autorun' require 'simplecov' SimpleCov.start require 'sixarm_ruby_range_parse' describe Range do describe "#parse" do it "parses two dots as a range including the end" do Range.parse("a..z").must_equal "a".."z" end it "parses three dots as a range including the end" do Range.parse("a...z").must_equal "a"..."z" end it "calls to_s on the input" do x = Object.new def x.to_s; "a..z"; end Range.parse(x).must_equal "a".."z" end it "round trips" do range = "a".."z" Range.parse(range).must_equal range end end describe "#parse_helper" do it "is pass through (subclasses will override this method)" do Range.parse_helper("a").must_equal ("a") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sixarm_ruby_range_parse-1.0.1 | test/sixarm_ruby_range_parse_test.rb |