Sha256: c767002497e5056a29ab871f6cd568feb0959c344b63674875d608c7cdeb98ac
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require "test_helper" class OperaTest < Minitest::Test test "detects opera" do @browser = Browser.new ua: $ua["OPERA"] assert_equal "Opera", @browser.name assert @browser.opera? refute @browser.modern? assert_equal "11.64", @browser.full_version assert_equal "11", @browser.version end test "detects opera next" do @browser = Browser.new ua: $ua["OPERA_NEXT"] assert_equal "Opera", @browser.name assert_equal :opera, @browser.id assert @browser.opera? assert @browser.webkit? assert @browser.modern? refute @browser.chrome? assert_equal "15.0.1147.44", @browser.full_version assert_equal "15", @browser.version end test "detects opera mini" do @browser = Browser.new ua: $ua["OPERA_MINI"] assert @browser.opera_mini? refute @browser.tablet? assert @browser.mobile? end test "detects opera mobi" do @browser = Browser.new ua: $ua["OPERA_MOBI"] assert @browser.opera? refute @browser.tablet? assert @browser.mobile? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
browser2-1.0.0 | test/unit/opera_test.rb |