Sha256: 3805895d00035179432867f3f518290f28a42306c3984d6b615d98d0befbe76a
Contents?: true
Size: 962 Bytes
Versions: 6
Compression:
Stored size: 962 Bytes
Contents
# encoding: UTF-8 require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper') class HandsetDetectionController < ApplicationController def index render :inline => <<-ERB <% if galakei? %> <% if request.docomo? %> docomo <% elsif request.au? %> au <% elsif request.softbank? %> softbank <% end %> <% else %> not galakei <% end %> ERB end end feature 'handset detection' do scenario 'for docomo', :driver => :docomo do visit '/handset_detection' page.body.should match("docomo") end scenario 'for au', :driver => :au do visit '/handset_detection' page.body.should match("au") end scenario 'for softbank', :driver => :softbank do visit '/handset_detection' page.body.should match("softbank") end scenario 'for non galakei' do visit '/handset_detection' page.body.should match("not galakei") end end
Version data entries
6 entries across 6 versions & 1 rubygems