Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lets get with the times and start using minitest
- Loading branch information
Lee Jarvis
committed
Feb 8, 2012
1 parent
3f17281
commit 82863e5
Showing
23 changed files
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
require 'helper' | ||
|
||
class TestMiniDate < Test::Unit::TestCase | ||
class TestMiniDate < TestCase | ||
def test_valid_month | ||
assert_raise(ArgumentError){ Chronic::MiniDate.new(0,12) } | ||
assert_raise(ArgumentError){ Chronic::MiniDate.new(13,1) } | ||
assert_raises(ArgumentError){ Chronic::MiniDate.new(0,12) } | ||
assert_raises(ArgumentError){ Chronic::MiniDate.new(13,1) } | ||
end | ||
|
||
def test_is_between | ||
m=Chronic::MiniDate.new(3,2) | ||
assert m.is_between?(Chronic::MiniDate.new(2,4), Chronic::MiniDate.new(4,7)) | ||
assert !m.is_between?(Chronic::MiniDate.new(1,5), Chronic::MiniDate.new(2,7)) | ||
assert !m.is_between?(Chronic::MiniDate.new(1,5), Chronic::MiniDate.new(2,7)) | ||
|
||
#There was a hang if date tested is in december and outside the testing range | ||
m=Chronic::MiniDate.new(12,24) | ||
assert !m.is_between?(Chronic::MiniDate.new(10,1), Chronic::MiniDate.new(12,21)) | ||
end | ||
|
||
def test_is_between_short_range | ||
m=Chronic::MiniDate.new(5,10) | ||
assert m.is_between?(Chronic::MiniDate.new(5,3), Chronic::MiniDate.new(5,12)) | ||
assert !m.is_between?(Chronic::MiniDate.new(5,11), Chronic::MiniDate.new(5,15)) | ||
end | ||
|
||
def test_is_between_wrapping_range | ||
m=Chronic::MiniDate.new(1,1) | ||
assert m.is_between?(Chronic::MiniDate.new(11,11), Chronic::MiniDate.new(2,2)) | ||
m=Chronic::MiniDate.new(12,12) | ||
assert m.is_between?(Chronic::MiniDate.new(11,11), Chronic::MiniDate.new(1,5)) | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters