Sha256: 77c9f7dca0089ae88deecf53fa0a974214d87d8dd25246630adad97429dd8866

Contents?: true

Size: 970 Bytes

Versions: 3

Compression:

Stored size: 970 Bytes

Contents

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

describe Sniffles::Sniffers::Invision do
  describe "#output" do    
    context "invision", :vcr => { :cassette_name => "community_invisionpower_com" } do
      subject { described_class.new(page_body("http://community.invisionpower.com/")).output }
      
      its([:found])   { should eq true }
      its([:version]) { should eq "3.3.0 Beta 3" }
    end
    
    context "invision w/o version", :vcr => { :cassette_name => "invisionmodding_com" } do
      subject { described_class.new(page_body("http://invisionmodding.com/")).output }

      its([:found])   { should eq true }
      its([:version]) { should eq false }
    end
    
    context "not invision" do
      subject { described_class.new(empty_html_doc).output }
      
      its([:found]) { should eq false }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sniffles-0.1.5 spec/sniffles/sniffers/cms/invision_spec.rb
sniffles-0.1.4 spec/sniffles/sniffers/cms/invision_spec.rb
sniffles-0.1.3 spec/sniffles/sniffers/cms/invision_spec.rb