Permalink
Browse files

Add tests for view spec_type [fixes #86]

Just make sure we don't match any test that ends in 'view'.
  • Loading branch information...
blowmage committed Jan 24, 2013
1 parent 7782737 commit a02a7f1ee4210378f9459da5c8288bd297648134
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/rails/action_view/test_spec_type.rb
@@ -25,6 +25,13 @@ def test_spec_type_resolves_for_matching_view_strings
assert_view MiniTest::Spec.spec_type("widget view test")
end
+ def test_spec_type_wont_match_models_that_end_in_view
+ refute_view MiniTest::Spec.spec_type("NewsOverviewTest")
+ refute_view MiniTest::Spec.spec_type("News Overview Test")
+ refute_view MiniTest::Spec.spec_type("NewsOverview")
+ refute_view MiniTest::Spec.spec_type("News Overview")
+ end
+
def test_spec_type_wont_match_non_space_characters
refute_view MiniTest::Spec.spec_type("Widget Helper\tTest")
refute_view MiniTest::Spec.spec_type("Widget Helper\rTest")

0 comments on commit a02a7f1

Please sign in to comment.