Changeset 2846
- Timestamp:
- 11/02/05 10:15:31 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/CHANGELOG
r2843 r2846 1 1 *SVN* 2 3 * Added demonstration of fixture use to the test case generated by the model generator [DHH] 2 4 3 5 * If specified, pass PostgreSQL client character encoding to createdb. #2703 [Kazuhiko <kazuhiko@fdiary.net>] trunk/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml
r631 r2846 1 1 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 2 first _<%= singular_name %>:2 first: 3 3 id: 1 4 another _<%= singular_name %>:4 another: 5 5 id: 2 trunk/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
r617 r2846 4 4 fixtures :<%= table_name %> 5 5 6 def setup7 @<%= singular_name %> = <%= class_name %>.find(1)8 end9 10 6 # Replace this with your real tests. 11 7 def test_truth 12 assert_kind_of <%= class_name %>, @<%= singular_name %>8 assert_kind_of <%= class_name %>, <%= table_name %>(:first) 13 9 end 14 10 end