diff --git a/Gemfile b/Gemfile index bdb395a..9c16eee 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source "http://rubygems.org" +source "https://rubygems.org" # Specify your gem's dependencies in language_list.gemspec gemspec diff --git a/README.md b/README.md index 2a8f9f5..c8d1d2e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ A list of languages based upon ISO-639-1 and ISO-639-3 with functions to retriev english.iso_639_3.inspect #=> "eng" english.common? #=> true +## Testing + + rake + ## Thanks Thanks goes to Steve Hardie for his work on creating a list of common languages (http://stevehardie.com/2009/10/list-of-common-languages/). diff --git a/Rakefile b/Rakefile index 14cfe0b..b93f00c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,2 +1,10 @@ require 'bundler' Bundler::GemHelper.install_tasks + +require 'rake/testtask' +Rake::TestTask.new do |t| + t.test_files = FileList['test/language_list_test.rb'] + t.verbose = true +end + +task :default => :test diff --git a/language_list.gemspec b/language_list.gemspec index 1c74370..ffec93f 100644 --- a/language_list.gemspec +++ b/language_list.gemspec @@ -18,4 +18,5 @@ Gem::Specification.new do |s| s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] + s.add_development_dependency 'minitest' end diff --git a/test/language_list_test.rb b/test/language_list_test.rb index 4fad366..45a55e3 100755 --- a/test/language_list_test.rb +++ b/test/language_list_test.rb @@ -1,10 +1,7 @@ -#!/usr/bin/env ruby - -$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))) -require 'test/unit' +require 'minitest/autorun' require 'language_list' -class LanguageListTest < Test::Unit::TestCase +class LanguageListTest < Minitest::Test def test_all_languages assert_equal 7707, LanguageList::ALL_LANGUAGES.length end