Sha256: 33a21ccf14cdc6f7d9a6fb02eaf5883e93511634bd2e573e2801a3683fdb7b45
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require "test_helper" class OperaTest < Minitest::Test setup do @browser = Browser.new end test "detects opera" do @browser.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.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.ua = $ua["OPERA_MINI"] assert @browser.opera_mini? refute @browser.tablet? assert @browser.mobile? end test "detects opera mobi" do @browser.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 |
---|---|
browser-1.1.0 | test/unit/opera_test.rb |