Sha256: 43a8d4e11ef055fe97a077c5ee83d29bed9b087468f6cae31333139ec0e20261
Contents?: true
Size: 497 Bytes
Versions: 55
Compression:
Stored size: 497 Bytes
Contents
class ActionController::TestCase class << self {:pc => "mozilla", :galakei => "DoCoMo/2.0 SH06A3(c500;TB;W24H14)"}.each do |method, user_agent| class_eval(<<-EOD) def with_#{method}(&block) context("with #{method} browser") do setup { @request.user_agent = '#{user_agent}' } merge_block(&block) end end EOD end def with_pc_and_galakei(&block) with_pc(&block) with_galakei(&block) end end end
Version data entries
55 entries across 55 versions & 1 rubygems