Sha256: 493cff7ab170d2dbf1beb085d1692d493db691f772aba31f298eff72f3cc133b

Contents?: true

Size: 835 Bytes

Versions: 13

Compression:

Stored size: 835 Bytes

Contents

require 'spec/spec_helper'
require 'lib/stowaway/options'

describe Stowaway::Options do
  
  it "should use the the default file types when none are provided" do
    opts = Stowaway::Options.new(['fake/path'])
    Stowaway::Options::DEFAULT_FILE_TYPES.should == %w{.jpg .gif .png .ico .js .css}
  end
  
  it "should use the file types provided by user" do
    opts = Stowaway::Options.new(['-t', '.png .jpg', 'fake/path'])
    opts.file_types.should == %w{.png .jpg}
  end
  
  it "should parse path provided by user when file types are provided" do
    opts = Stowaway::Options.new(['-t', '.png .jpg', 'fake/path'])
    opts.path.should == 'fake/path'
  end
  
  it "should parse path provided by user when no file types are provided" do
    opts = Stowaway::Options.new(['fake/path'])
    opts.path.should == 'fake/path'
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
stowaway-0.2.5 spec/lib/options_spec.rb
stowaway-0.2.2 spec/lib/options_spec.rb
stowaway-0.2.0 spec/lib/options_spec.rb
stowaway-0.1.10 spec/lib/options_spec.rb
stowaway-0.1.9 spec/lib/options_spec.rb
stowaway-0.1.8 spec/lib/options_spec.rb
stowaway-0.1.6 spec/lib/options_spec.rb
stowaway-0.1.5 spec/lib/options_spec.rb
stowaway-0.1.2 spec/lib/options_spec.rb
stowaway-0.1.1 spec/lib/options_spec.rb
stowaway-0.0.6 spec/lib/options_spec.rb
stowaway-0.0.4 spec/lib/options_spec.rb
stowaway-0.0.1 spec/lib/options_spec.rb