Sha256: 6bd9407a2292340089f7a9036a69e41425694f38f6bc0bd7bc8d952d9f96c495

Contents?: true

Size: 517 Bytes

Versions: 3

Compression:

Stored size: 517 Bytes

Contents

require File.expand_path('../helper', __FILE__)
	
class TestOS < MiniTest::Unit::TestCase
  
  should "be on mac" do
  	request = get_request(:Chrome, '8.0.552.237')
  	assert request.mac?
  end
  
  should "be on pc" do
  	request = get_request(:IE, '6.0')
  	assert request.pc?
  end
  
  should "be on linux" do
  	request = get_request(:Chrome, '4.0.202.2')  	
  	assert request.linux?
  end
  
  should "be on mobile" do
  	request = get_request(:MobileSafari, 'iPhone')  	
  	assert request.mobile?
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
which_browser-0.2.2 test/test_os.rb
which_browser-0.2.1 test/test_os.rb
which_browser-0.2.0 test/test_os.rb