Sha256: c75c709c6791b5eff995965e6e4a9dfd1474af8ff4cd7791a67a6051f1eaecbf

Contents?: true

Size: 650 Bytes

Versions: 10

Compression:

Stored size: 650 Bytes

Contents

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

describe Iconoclasm do
  
  describe "#extract" do
    before do
      @url = 'http://www.website.com/some-crappy-blog-post'
    end
    
    it "should extract the favicon for the given url" do
      Iconoclasm.expects(:extract_favicon_from).with(@url, nil)
      Iconoclasm::Favicon.stubs(:new)
      Iconoclasm.extract(@url)
    end
    
    it "should make a new Favicon instance" do
      favicon = stub('favicon')
      Iconoclasm.stubs(:extract_favicon_from).returns(favicon)
      Iconoclasm::Favicon.expects(:new).with(favicon)
      Iconoclasm.extract(@url)
    end
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
iconoclasm-1.0.9 spec/iconoclasm_spec.rb
iconoclasm-1.0.8 spec/iconoclasm_spec.rb
iconoclasm-1.0.7 spec/iconoclasm_spec.rb
iconoclasm-1.0.6 spec/iconoclasm_spec.rb
iconoclasm-1.0.5 spec/iconoclasm_spec.rb
iconoclasm-1.0.4 spec/iconoclasm_spec.rb
iconoclasm-1.0.3 spec/iconoclasm_spec.rb
iconoclasm-1.0.2 spec/iconoclasm_spec.rb
iconoclasm-1.0.1 spec/iconoclasm_spec.rb
iconoclasm-1.0.0 spec/iconoclasm_spec.rb