Sha256: ec4504baad680860301e0dce2ddf84c00c1aa6c9497216c10fb3b35ec4a4f1cb
Contents?: true
Size: 861 Bytes
Versions: 1
Compression:
Stored size: 861 Bytes
Contents
require 'spec_helper' describe 'command line options parsing' do it 'return defaults if no options specified' do options = ArMailerAWS.parse_options([]) options.batch_size.should == 100 options.delay.should == 180 options.quota.should == 10_000 options.rate.should == 5 options.max_age.should == 3600 * 24 * 7 end it 'batch_size' do ArMailerAWS.parse_options(%w(-b 10)).batch_size.should == 10 end it 'delay' do ArMailerAWS.parse_options(%w(-d 90)).delay.should == 90 end it 'quota' do ArMailerAWS.parse_options(%w(-q 100)).quota.should == 100 end it 'rate' do ArMailerAWS.parse_options(%w(-r 7)).rate.should == 7 end it 'max_age' do ArMailerAWS.parse_options(%w(-m 300)).max_age.should == 300 end it 'verbose' do ArMailerAWS.parse_options(%w(-v)).verbose.should be_true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ar_mailer_aws-0.0.1 | spec/ar_mailer_aws/parse_options_spec.rb |