Skip to content

Instantly share code, notes, and snippets.

@ahawkins
Last active December 18, 2015 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ahawkins/5817566 to your computer and use it in GitHub Desktop.
Save ahawkins/5817566 to your computer and use it in GitHub Desktop.
# run with: ruby tests.rb
gem 'minitest'
require 'minitest/autorun'
require 'minitest/hell'
require 'net/http'
require 'uri'
class SitesTest < MiniTest::Test
SITES = ['http://example.com', 'http://example.com', 'http://example.com', 'http://example.com', 'http://example.com']
SITES.each_with_index do |site, index|
define_method "test_site_#{index}" do
puts "Testing: #{site}"
Net::HTTP.get URI(site)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment