Sha256: b3191d5f4d388b2ff4b4f99a9ec5fc97b2d7c8a90e5ff84c3581ad0f5b8a2d83
Contents?: true
Size: 829 Bytes
Versions: 61
Compression:
Stored size: 829 Bytes
Contents
# -*- coding: utf-8 -*- require File.join(File.expand_path(File.dirname(__FILE__)), '../../rack_helper.rb') describe Jpmobile::Rack::MobileCarrier, "Windows Phone" do include Rack::Test::Methods context "端末種別で" do it "WindowsPhone を判別できること" do res = Rack::MockRequest.env_for( 'http://jpmobile-rails.org/', 'HTTP_USER_AGENT' => 'Mozilla/4.0 (Compatible; MSIE 6.0; Windows NT 5.1 T-01A_6.5; Windows Phone 6.5)') env = Jpmobile::Rack::MobileCarrier.new(UnitApplication.new).call(res)[1] env['rack.jpmobile'].class.should == Jpmobile::Mobile::WindowsPhone env['rack.jpmobile'].position.should be_nil env['rack.jpmobile'].smart_phone?.should be_true env['rack.jpmobile'].supports_cookie?.should be_true end end end
Version data entries
61 entries across 61 versions & 1 rubygems