Sha256: 65d5ebd7901d00cd22bd0fb95132b57fd67934ef30320da3d4bf6416edb154b3

Contents?: true

Size: 715 Bytes

Versions: 3

Compression:

Stored size: 715 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '../../spec_helper')

module Downer
  describe StrategyFinder do
    describe "Class method find_strategy" do
      it "should return flat file strategy when url source is a local file" do
        strategy = StrategyFinder.find_strategy(fixture_directory + '/some_images.txt')
        strategy.should respond_to :get_urls
        strategy.source_type.should == 'flatfile'
      end
      
      it "should return a website strategy when url source is a web resource" do
        strategy = StrategyFinder.find_strategy('http://www.example.com')
        strategy.should respond_to :get_urls
        strategy.source_type.should == 'website'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
downer-0.3.2 spec/downer/download_strategy_spec.rb
downer-0.3.1 spec/downer/download_strategy_spec.rb
downer-0.3.0 spec/downer/download_strategy_spec.rb