Sha256: 240f836b1b55291f0f8ab8637b654d192616300395f5e18ba23f4338626876f1
Contents?: true
Size: 724 Bytes
Versions: 3
Compression:
Stored size: 724 Bytes
Contents
shared_examples 'has browser info' do describe '#browser_info' do let(:user_agent) { Object.new } before(:each) do user_agent.stub(:browser).and_return('TestBrowser') UserAgent.stub(:parse).and_return(user_agent) end context 'without platform' do before(:each) do user_agent.stub(:platform).and_return(nil) end it 'returns the browser name' do subject.browser_info.should == 'TestBrowser' end end context 'with a platform' do before(:each) do user_agent.stub(:platform).and_return('Linux') end it 'returns the browser name' do subject.browser_info.should == 'TestBrowser (Linux)' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
casino-4.1.2 | spec/support/has_browser_info.rb |
casino-4.1.1 | spec/support/has_browser_info.rb |
casino-4.1.0 | spec/support/has_browser_info.rb |