Sha256: 076ad5aa319a7623d37dc60ebb5c61b3bbe2c2b8bd2a0d8e385bc6cb47fd451f
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 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 expect { Woothee::ATTRIBUTE_NAME }.not_to raise_error() expect(Woothee::ATTRIBUTE_NAME).to eql(:name) end it "contains list of categories/attributes" do expect { Woothee::ATTRIBUTE_LIST }.not_to raise_error() expect { Woothee::CATEGORY_LIST }.not_to raise_error() expect(Woothee::ATTRIBUTE_LIST).to eql([ Woothee::ATTRIBUTE_NAME, Woothee::ATTRIBUTE_CATEGORY, Woothee::ATTRIBUTE_OS, Woothee::ATTRIBUTE_VENDOR, Woothee::ATTRIBUTE_VERSION, ]) expect(Woothee::CATEGORY_LIST).to 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 expect(Woothee::DataSet.get('GoogleBot')[:name]).to eql('Googlebot') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
woothee-0.4.2 | spec/01_dataset_spec.rb |