Sha256: 748a413e8403a1f1ab1183ee8d260c0a7b16ab5716629cdb037f3962a36e2ee5

Contents?: true

Size: 448 Bytes

Versions: 8

Compression:

Stored size: 448 Bytes

Contents

require 'spec_helper'

describe "String extenssion" do

  # Called before each example.
  before(:each) do
    # Do nothing
  end

  # Called after each example.
  after(:each) do
    # Do nothing
  end

  it "should properly parse amount" do
    "$1,000,000.00".to_f.should == Float(1000000)
    "$1,00".to_f.should == Float(1)
    "-$1.00".to_f.should == Float(-1)
    "$-1.0".to_f.should == Float(-1)
    "$1,0".to_f.should == Float(1)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
csv2qif-1.2013.5 spec/string_ext_spec.rb
csv2qif-1.0.4 spec/string_ext_spec.rb
csv2qif-1.0.3 spec/string_ext_spec.rb
csv2qif-1.0.2 spec/string_ext_spec.rb
csv2qif-1.0.1 spec/string_ext_spec.rb
csv2qif-1.0 spec/string_ext_spec.rb
csv2qif-0.0.4 spec/string_ext_spec.rb
csv2qif-0.0.2 spec/string_ext_spec.rb