spec/lib/roo/excelx/format_spec.rb in roo-1.13.2 vs spec/lib/roo/excelx/format_spec.rb in roo-2.0.0beta1

- old
+ new

@@ -9,12 +9,12 @@ '#,##0' => :float, '#,##0.00' => :float, '0%' => :percentage, '0.00%' => :percentage, '0.00E+00' => :float, - '# ?/?' => :float, #??? TODO: - '# ??/??' => :float, #??? TODO: + '# ?/?' => :float, # ??? TODO: + '# ??/??' => :float, # ??? TODO: 'mm-dd-yy' => :date, 'd-mmm-yy' => :date, 'd-mmm' => :date, 'mmm-yy' => :date, 'h:mm AM/PM' => :date, @@ -31,20 +31,21 @@ '[h]:mm:ss' => :time, 'mmss.0' => :time, '##0.0E+0' => :float, '@' => :float, #-- zusaetzliche Formate, die nicht standardmaessig definiert sind: - "yyyy\\-mm\\-dd" => :date, + 'yyyy\\-mm\\-dd' => :date, 'dd/mm/yy' => :date, 'hh:mm:ss' => :time, - "dd/mm/yy\\ hh:mm" => :datetime, + 'dd/mm/yy\\ hh:mm' => :datetime, 'dd/mmm/yy\\ hh:mm' => :datetime, 'dd/mmm/yy' => :date, # 2011-05-21 'yyyy-mm-dd' => :date, # 2011-09-16 - 'yyyy-mm-dd;@' => :date + 'yyyy-mm-dd;@' => :date, + '#0_);[Red]\(0\)' => :float }.each do |format, type| it "translates #{format} to #{type}" do - Roo::Excelx::Format.to_type(format).should == type + expect(Roo::Excelx::Format.to_type(format)).to eq(type) end end end end