Skip to content

Commit

Permalink
getting coveralls working
Browse files Browse the repository at this point in the history
* moved "require 'minitest/autorun'" to test helper
* removed .coveralls.yml (repo token shouldn't be public; not needed
for travis-ci)
* fixed failing test: test_in_words_between_11_months_and_year
  • Loading branch information
nickmerwin committed Mar 8, 2013
1 parent efd36f8 commit 55947de
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Rakefile
Expand Up @@ -17,9 +17,8 @@ Bundler::GemHelper.install_tasks
desc "Run all of the tests"
Rake::TestTask.new do |config|
config.libs << 'test'
config.pattern = 'test/**/*_test*'
config.pattern = 'test/**/*_test.rb'
config.verbose = true
config.warning = true
end

desc "Generate all of the docs"
Expand Down
5 changes: 4 additions & 1 deletion test/helper.rb
@@ -1,4 +1,7 @@
require 'coveralls'
Coveralls.wear!
Coveralls.wear! do
add_filter "/test/"
end
require 'minitest/autorun'
require 'timecop'
require 'time-lord'
2 changes: 1 addition & 1 deletion test/lib/time-lord/extentions/integer_test.rb
@@ -1,4 +1,4 @@
require 'minitest/autorun'

require 'helper'

class TestTimeLordExtentionsInteger < MiniTest::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/lib/time-lord/extentions/time_test.rb
@@ -1,4 +1,4 @@
require 'minitest/autorun'

require_relative '../../../helper'

class TestTimeLordExtentionsTime < MiniTest::Unit::TestCase
Expand Down
4 changes: 2 additions & 2 deletions test/lib/time-lord/period_test.rb
@@ -1,4 +1,4 @@
require 'minitest/autorun'

require 'helper'

class TestTimeLordPeriod < MiniTest::Unit::TestCase
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_in_words_future_year
def test_in_words_between_11_months_and_year
expected = "11 months from now"
Timecop.freeze(Time.local(2013, 1, 1))
actual = Time.local(2013, 12, 3).ago.in_words
actual = Time.local(2013, 12, 1).ago.in_words
assert_equal(expected, actual)
end

Expand Down
2 changes: 1 addition & 1 deletion test/lib/time-lord/scale_test.rb
@@ -1,4 +1,4 @@
require 'minitest/autorun'

require 'helper'

class TestTimeLordScale < MiniTest::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/lib/time-lord/time_test.rb
@@ -1,4 +1,4 @@
require 'minitest/autorun'

require 'helper'

class TestTimeLordTime < MiniTest::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/lib/time-lord_test.rb
@@ -1,4 +1,4 @@
require 'minitest/autorun'

require 'helper'

class TestTimeLord < MiniTest::Unit::TestCase
Expand Down

0 comments on commit 55947de

Please sign in to comment.