Skip to content

Instantly share code, notes, and snippets.

@remear
Forked from ahawkins/tests.rb
Created June 21, 2013 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remear/5835139 to your computer and use it in GitHub Desktop.
Save remear/5835139 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