diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-31 18:57:56 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-31 18:57:56 -0200 |
commit | 487145f871d93a56d128b135720d8059e831985d (patch) | |
tree | 99d5caf64c5f5d086626f8790225b23071879938 /guides/source | |
parent | 0dd99f1003980406c5b9ea7a2bbb4f97c68cdd9a (diff) | |
parent | b36f123d09e947fa2e1d35ffb0e973b028673d92 (diff) | |
download | rails-487145f871d93a56d128b135720d8059e831985d.tar.gz rails-487145f871d93a56d128b135720d8059e831985d.tar.bz2 rails-487145f871d93a56d128b135720d8059e831985d.zip |
Merge pull request #17040 from clyfe/patch-1
Explicit route test class
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/testing.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md index b784098fbb..8ad1eed72c 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -905,8 +905,10 @@ Testing Routes Like everything else in your Rails application, it is recommended that you test your routes. An example test for a route in the default `show` action of `Articles` controller above should look like: ```ruby -test "should route to article" do - assert_routing '/articles/1', {controller: "articles", action: "show", id: "1"} +class ArticleRoutesTest < ActionController::TestCase + test "should route to article" do + assert_routing '/articles/1', { controller: "articles", action: "show", id: "1" } + end end ``` |