Sha256: 5764019f0230152786c48b8ab75fe97a068a18f2fc3264badb19251af24763dd
Contents?: true
Size: 925 Bytes
Versions: 2
Compression:
Stored size: 925 Bytes
Contents
require File.expand_path("test_helper", File.dirname(__FILE__)) require 'bigdecimal' class MinimalAppTest < Test::Unit::TestCase def setup generate_app :excluded_stdlibs => %w{ant cgi digest dl drb ffi irb net optparse racc rbconfig rdoc rexml rinda rss rubygems runit shell soap test uri webrick win32 wsdl xmlrpc xsd ../1.9} end def teardown cleanup_app end def test_minimal_apk_is_less_than_3_mb apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / (1024 * 1024) upper_limit = 3.0 lower_limit = upper_limit * 0.85 assert apk_size <= upper_limit, "APK was larger than #{'%.1f' % upper_limit}MB: #{'%.1f' % apk_size.ceil(1)}MB" assert apk_size >= lower_limit, "APK was smaller than #{'%.1f' % lower_limit}MB: #{'%.1f' % apk_size.floor(1)}MB. You should lower the limit." end def test_minimal_apk_succeeds_tests run_app_tests end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruboto-0.5.4 | test/minimal_app_test.rb |
ruboto-0.5.3 | test/minimal_app_test.rb |