Skip to content

Commit

Permalink
Use minitest, specify the dependency in the gemspec
Browse files Browse the repository at this point in the history
Use https rubygems url in gemfile

Add instructions to run tests to readme
  • Loading branch information
andyatkinson committed Feb 5, 2014
1 parent 28db5ca commit 186136a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"
source "https://rubygems.org"

# Specify your gem's dependencies in language_list.gemspec
gemspec
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand Down
8 changes: 8 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions language_list.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 2 additions & 5 deletions test/language_list_test.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 186136a

Please sign in to comment.