Sha256: f7299d98f2cec657fbcdd50e8ef94a4472166738c065045b56d101fcf1278b4a
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
# -*- coding: utf-8 -*- $LOAD_PATH.push '../lib' unless $LOAD_PATH.include?('../lib') require 'woothee/dataset' describe Woothee::DataSet do it "contains constants" do lambda { Woothee::ATTRIBUTE_NAME }.should_not raise_error(NameError) Woothee::ATTRIBUTE_NAME.should eql(:name) end it "contains list of categories/attributes" do lambda { Woothee::ATTRIBUTE_LIST }.should_not raise_error(NameError) lambda { Woothee::CATEGORY_LIST }.should_not raise_error(NameError) Woothee::ATTRIBUTE_LIST.should eql([ Woothee::ATTRIBUTE_NAME, Woothee::ATTRIBUTE_CATEGORY, Woothee::ATTRIBUTE_OS, Woothee::ATTRIBUTE_VENDOR, Woothee::ATTRIBUTE_VERSION, ]) Woothee::CATEGORY_LIST.should eql([ Woothee::CATEGORY_PC, Woothee::CATEGORY_SMARTPHONE, Woothee::CATEGORY_MOBILEPHONE, Woothee::CATEGORY_CRAWLER, Woothee::CATEGORY_APPLIANCE, Woothee::CATEGORY_MISC, Woothee::VALUE_UNKNOWN, ]) end it "contains dataset" do Woothee::DataSet.get('GoogleBot')[:name].should eql('Googlebot') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
woothee-0.3.2 | spec/01_dataset_spec.rb |
woothee-0.3.0 | spec/01_dataset_spec.rb |
woothee-0.2.4 | spec/01_dataset_spec.rb |