Sha256: 5f2621026f5893b296c70447d2b7cd8ddf342a613cf0aee84c71c2f4b9a55ea9
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
require File.expand_path('test_helper', File.dirname(__FILE__)) require 'net/http' class RubotoSetupTest < Minitest::Test include Ruboto::Util::Setup def test_if_sdk_page_still_exists? uri = URI.parse(SDK_DOWNLOAD_PAGE) res = Net::HTTP.get_response(uri) assert_equal 200, res.code.to_i end def test_if_haxm_version_page_still_exists? uri = URI.parse(ADDONS_URL) res = Net::HTTP.get_response(uri) assert_equal 200, res.code.to_i end def test_if_haxm_download_still_exists? filename, version = get_new_haxm_filename unless (filename.empty? || version.empty?) uri = URI.parse("#{File.dirname(ADDONS_URL)}/#{filename}") res = Net::HTTP.get_response(uri) assert_equal 200, res.code.to_i, uri end end def test_if_regex_still_applies_to_sdk regex = '(\>installer_.*.exe)' page_content = Net::HTTP.get(URI.parse(SDK_DOWNLOAD_PAGE)) link = page_content.scan(/#{regex}/).to_s assert_match /\d+(\.\d+)?(\.\d+)?/, link end describe 'Upgrade HAXM' do include Ruboto::Util::Setup it 'should get the new HAXM file name and version' do filename, version = get_new_haxm_filename unless (filename.empty? || version.empty?) filename.must_match /haxm-(.*)\.zip/ version.must_match /\d\.\d\.\d/ end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruboto-1.5.0 | test/ruboto_setup_test.rb |