Sha256: 9d2ac16fc2421ae2e1a896673d179018f60f8d5a3126dc12956948ef0dce47fb
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' describe ACH::Formatter do before(:all) do module ACH::Formatter # redefining RULES FOR new test values RULES = RULES.dup RULES[:ljust_10] = '<-10' RULES[:ljust_10_transform] = '<-10|upcase' RULES[:rjust_10] = '->10' RULES[:rjust_10_spaced] = '->10-' end end it{ ACH::Formatter.ljust_10('FOO').should == 'FOO'.ljust(10) } it{ ACH::Formatter.ljust_10_transform('foo').should == 'FOO'.ljust(10) } it{ ACH::Formatter.rjust_10(1599).should == '1599'.rjust(10, '0') } it{ ACH::Formatter.rjust_10_spaced(1599).should == '1599'.rjust(10) } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ach_builder-0.0.2 | spec/formatter_spec.rb |
ach_builder-0.0.1.1 | spec/formatter_spec.rb |