Skip to content

Commit

Permalink
add test-case to verify error.path when a helper was not found.
Browse files Browse the repository at this point in the history
This verifies the code added with:
99c9d18
  • Loading branch information
senny committed Jul 12, 2013
1 parent 5bee14f commit 3af7b16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions actionpack/test/abstract/helper_test.rb
Expand Up @@ -116,6 +116,11 @@ def test_controller_raise_error_about_missing_helper
e = assert_raise(AbstractController::Helpers::MissingHelperError) { AbstractInvalidHelpers.helper(:missing) } e = assert_raise(AbstractController::Helpers::MissingHelperError) { AbstractInvalidHelpers.helper(:missing) }
assert_equal "Missing helper file helpers/missing_helper.rb", e.message assert_equal "Missing helper file helpers/missing_helper.rb", e.message
end end

def test_missing_helper_error_has_the_right_path
e = assert_raise(AbstractController::Helpers::MissingHelperError) { AbstractInvalidHelpers.helper(:missing) }
assert_equal "helpers/missing_helper.rb", e.path
end
end end
end end
end end

0 comments on commit 3af7b16

Please sign in to comment.