diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-11-04 11:20:19 -0500 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-11-04 11:20:19 -0500 |
commit | 3f53df74d716c9db6b94a0ead9b8d2b526b6d8ee (patch) | |
tree | 4fc0f2649069fac55e339501d9a79aa8f1cc3b85 /guides | |
parent | e38aa9d7464c6cfd851dd4436b67a858e4e899f3 (diff) | |
parent | 91f5adf03aaf5347c694d901a81c25ee40525497 (diff) | |
download | rails-3f53df74d716c9db6b94a0ead9b8d2b526b6d8ee.tar.gz rails-3f53df74d716c9db6b94a0ead9b8d2b526b6d8ee.tar.bz2 rails-3f53df74d716c9db6b94a0ead9b8d2b526b6d8ee.zip |
Merge pull request #22174 from metaskills/defsetup
Update docs/comments to use setup/teardown blocks vs. methods. [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_model_basics.md | 6 | ||||
-rw-r--r-- | guides/source/testing.md | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/active_model_basics.md b/guides/source/active_model_basics.md index fe2501bd87..8f8256c983 100644 --- a/guides/source/active_model_basics.md +++ b/guides/source/active_model_basics.md @@ -8,10 +8,10 @@ classes. Active Model allows for Action Pack helpers to interact with plain Ruby objects. Active Model also helps build custom ORMs for use outside of the Rails framework. -After reading this guide, you will know: +After reading this guide, you will know: * How an Active Record model behaves. -* How Callbacks and validations work. +* How Callbacks and validations work. * How serializers work. * The Rails internationalization (i18n) framework. @@ -428,7 +428,7 @@ the Active Model API. class PersonTest < ActiveSupport::TestCase include ActiveModel::Lint::Tests - def setup + setup do @model = Person.new end end diff --git a/guides/source/testing.md b/guides/source/testing.md index a07772036b..2f941a8280 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -908,12 +908,12 @@ require 'test_helper' class ArticlesControllerTest < ActionController::TestCase # called before every single test - def setup + setup do @article = articles(:one) end # called after every single test - def teardown + teardown do # when controller is using cache it may be a good idea to reset it afterwards Rails.cache.clear end |