Skip to content

Commit

Permalink
Add tests for view spec_type [fixes minitest#86]
Browse files Browse the repository at this point in the history
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 a02a7f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/rails/action_view/test_spec_type.rb
Expand Up @@ -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")
Expand Down

0 comments on commit a02a7f1

Please sign in to comment.