Sha256: 7c08b62d8de965cb4f922aa56766a1937aa31c3dfd70676626d0cd3faa6ab788

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

require File.expand_path('test_helper', File.dirname(__FILE__))
require 'net/http'

class RubotoSetupTest < Test::Unit::TestCase
  SDK_DOWNLOAD_PAGE = 'http://developer.android.com/sdk/index.html?hl=sk'

  def test_if_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_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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruboto-1.1.1 test/ruboto_setup_test.rb