Sha256: e9af97e46a51f56378ecf6c1641cd8d3660719ddc4964487043d415912e4a567
Contents?: true
Size: 625 Bytes
Versions: 9
Compression:
Stored size: 625 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "spec_helper") describe SafeYAML::Transform::ToDate do it "returns true when the value matches a valid Date" do subject.transform?("2013-01-01")[0].should == true end it "returns false when the value does not match a valid Date" do subject.transform?("foobar").should be_false end it "returns false when the value does not end with a Date" do subject.transform?("2013-01-01\nNOT A DATE").should be_false end it "returns false when the value does not begin with a Date" do subject.transform?("NOT A DATE\n2013-01-01").should be_false end end
Version data entries
9 entries across 9 versions & 1 rubygems