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

Version Path
galakei-0.15.2 lib/galakei/shoulda_macros.rb
galakei-0.15.1 lib/galakei/shoulda_macros.rb
galakei-0.15.0 lib/galakei/shoulda_macros.rb
galakei-0.14.4 lib/galakei/shoulda_macros.rb
galakei-0.14.3 lib/galakei/shoulda_macros.rb
galakei-0.14.2 lib/galakei/shoulda_macros.rb
galakei-0.14.1 lib/galakei/shoulda_macros.rb
galakei-0.14.0 lib/galakei/shoulda_macros.rb
galakei-0.13.7 lib/galakei/shoulda_macros.rb
galakei-0.13.6 lib/galakei/shoulda_macros.rb
galakei-0.13.5 lib/galakei/shoulda_macros.rb
galakei-0.13.4 lib/galakei/shoulda_macros.rb
galakei-0.13.3 lib/galakei/shoulda_macros.rb
galakei-0.13.2 lib/galakei/shoulda_macros.rb
galakei-0.13.1 lib/galakei/shoulda_macros.rb
galakei-0.13.0 lib/galakei/shoulda_macros.rb
galakei-0.12.1 lib/galakei/shoulda_macros.rb
galakei-0.12.0 lib/galakei/shoulda_macros.rb
galakei-0.11.3 lib/galakei/shoulda_macros.rb
galakei-0.11.2 lib/galakei/shoulda_macros.rb