Sha256: 55fd5de0932b814a92fc50bfffaabfc32eaf7e2a38ca0376c2405b98d58fdb0a

Contents?: true

Size: 664 Bytes

Versions: 7

Compression:

Stored size: 664 Bytes

Contents

class TestHelper
  def self.ios7
    UIDevice.currentDevice.systemVersion.to_f >= 7.0
  end
end

def silence_warnings(&block)
  warn_level = $VERBOSE
  $VERBOSE = nil
  begin
    result = block.call
  ensure
    $VERBOSE = warn_level
  end
  result
end

silence_warnings do
  module Bacon
    if ENV['filter']
      $stderr.puts "Filtering specs that match: #{ENV['filter']}"
      RestrictName = Regexp.new(ENV['filter'])
    end

    if ENV['filter_context']
      $stderr.puts "Filtering contexts that match: #{ENV['filter_context']}"
      RestrictContext = Regexp.new(ENV['filter_context'])
    end

    Backtraces = false if ENV['hide_backtraces']
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ProMotion-2.0.1 spec/helpers/test_helper.rb
ProMotion-2.0.0 spec/helpers/test_helper.rb
ProMotion-2.0.0.rc5 spec/helpers/test_helper.rb
ProMotion-2.0.0.rc4 spec/helpers/test_helper.rb
ProMotion-2.0.0.rc3 spec/helpers/test_helper.rb
ProMotion-2.0.0.rc2 spec/helpers/test_helper.rb
ProMotion-2.0.0.rc1 spec/helpers/test_helper.rb