Sha256: 069e128469bb0c5dbd92c3404c22e1d310e5e856d0b3a6d5021fda69369c9faf
Contents?: true
Size: 891 Bytes
Versions: 2
Compression:
Stored size: 891 Bytes
Contents
require File.expand_path('../../spec_helper', __FILE__) describe Genability::Client do Genability::Configuration::VALID_FORMATS.each do |format| context ".new(:format => '#{format}')" do before(:all) do @options = {:format => format}.merge(configuration_defaults) @client = Genability::Client.new(@options) @time = Time.now end # ISO 8601 date format with a syntax of: # yyyy-MM-dd'T'HH:mm:ss.SSSZ # ex. 2011-06-13T14:30:00.0-0700 # All fields must be specified even if they are zero. The .SSS # are the milliseconds and the Z is the GMT time zone offset. context ".format_to_iso8601" do it "should format dates to ISO 8601" do @client.send(:format_to_iso8601, @time). should =~ /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{1,3}-\d{4}/ end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
genability-0.3.0 | spec/client/helpers_spec.rb |
genability-0.2.0 | spec/client/helpers_spec.rb |