Sha256: 15435fc1ab300747c34df55e44f1a2cd8bf999c9942c6f2bd803314c4591915e

Contents?: true

Size: 626 Bytes

Versions: 4

Compression:

Stored size: 626 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/javascript/jquery')

describe Sniffles::Sniffers::Jquery do
  describe "#output" do    
    context "jquery", :vcr => { :cassette_name => "squidoo_com" } do
      let(:jquery)  { described_class.new(page_body("http://www.squidoo.com")) }
      
      it { jquery.output[:found].should eq true }
    end

    context "no jquery" do
      let(:blank)   { described_class.new(empty_html_doc) }
      
      it { blank.output[:found].should eq false }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sniffles-0.1.5 spec/sniffles/sniffers/javascript/jquery_spec.rb
sniffles-0.1.4 spec/sniffles/sniffers/javascript/jquery_spec.rb
sniffles-0.1.3 spec/sniffles/sniffers/javascript/jquery_spec.rb
sniffles-0.1.2 spec/sniffles/sniffers/javascript/jquery_spec.rb