Sha256: 54704a608008345a82c59a612022a628166d02c023efd6bf40e8a708cc38f163
Contents?: true
Size: 806 Bytes
Versions: 17
Compression:
Stored size: 806 Bytes
Contents
# # ActiveFacts tests: Value instances in the Runtime API # Copyright (c) 2008 Clifford Heath. Read the LICENSE file. # require 'activefacts/api' describe Date do it "should construct with no arguments" do proc { @d = Date.new() }.should_not raise_error @d.year.should == -4712 end it "should construct with a nil argument" do proc { @d = Date.new_instance(nil, nil) }.should_not raise_error @d.year.should == -4712 end it "should construct with a full arguments" do proc { @d = Date.civil(2012, 10, 31) }.should_not raise_error @d.to_s.should == "2012-10-31" end =begin it "should be encodable in JSON" do proc { @d = Date.new(2012, 10, 31) @d.to_json.should == "REVISIT" }.should_not raise_error end =end end
Version data entries
17 entries across 17 versions & 1 rubygems