Sha256: 537b3a010003b4514d6d7787401aad6af8c35eabdfe5a135c28c56ad94a2c8be

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/wordpress')

describe Sniffles::Sniffers::Wordpress do
  describe "#output" do
    context "feed, theme, pingback", :vcr => { :cassette_name => 'pearsonified_com' } do
      let(:wp) { described_class.new(page_body("http://www.pearsonified.com/"))  }
      
      it { wp.output[:found].should eq true }
      it { wp.output[:feed].should eq "http://feeds.feedburner.com/pearsonified" }
      it { wp.output[:theme].should eq "thesis_17" }
      it { wp.output[:pingback].should eq "http://www.pearsonified.com/xmlrpc.php" }
    end
    
    context "version", :vcr => { :cassette_name => 'humemes_com' } do
      let(:wp) { described_class.new(page_body("http://humemes.com/")) }
      
      it { wp.output[:version].should eq "2.3.1" }
    end  
    
    context "not wordpress" 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/cms/wordpress_spec.rb
sniffles-0.1.4 spec/sniffles/sniffers/cms/wordpress_spec.rb
sniffles-0.1.3 spec/sniffles/sniffers/cms/wordpress_spec.rb
sniffles-0.1.2 spec/sniffles/sniffers/cms/wordpress_spec.rb