Skip to content

Commit

Permalink
Add test for Configuration#fix_common_issues
Browse files Browse the repository at this point in the history
  • Loading branch information
parkr committed Aug 6, 2013
1 parent d19c698 commit 46b0d50
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ class TestConfiguration < Test::Unit::TestCase
assert_equal @config.backwards_compatibilize["include"], %w[STOP_THE_PRESSES.txt .heloses .git]
end
end
context "#fix_common_issues" do
setup do
@config = Proc.new do |val|
Configuration[{
'paginate' => val
}]
end
end
should "sets an invalid 'paginate' value to nil" do
assert_nil @config.call(0).fix_common_issues['paginate']
assert_nil @config.call(-1).fix_common_issues['paginate']
assert_nil @config.call(true).fix_common_issues['paginate']
end
end
context "loading configuration" do
setup do
@path = File.join(Dir.pwd, '_config.yml')
Expand Down

0 comments on commit 46b0d50

Please sign in to comment.