Sha256: 82b12b7fcb389aa131c10ba8ffe598de4ac6d22c49d6625306c04b80a419221e
Contents?: true
Size: 748 Bytes
Versions: 2
Compression:
Stored size: 748 Bytes
Contents
require 'spec_helper' describe IrusAnalytics::UserAgentFilter do context "singleton" do describe ".instance" do it "should return the singleton instance of the RobotsFilter" do expect(IrusAnalytics::UserAgentFilter.instance).to be_instance_of IrusAnalytics::UserAgentFilter end end describe ".filter_user_agent" do it "will return true when a user agent should be filtered" do expect(IrusAnalytics::UserAgentFilter.instance.filter_user_agent?("appie")).to be true end it "will return false when a user agent is valid and should not be filtered" do expect(IrusAnalytics::UserAgentFilter.instance.filter_user_agent?("Firefox 3.0")).to be false end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
irus_analytics-0.0.2 | spec/lib/irus_analytics/user_agent_filter_spec.rb |
irus_analytics-0.0.1 | spec/lib/irus_analytics/user_agent_filter_spec.rb |