aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authoreparreno <emili@eparreno.com>2010-04-26 22:32:10 +0200
committereparreno <emili@eparreno.com>2010-04-26 22:32:10 +0200
commita5713147558648429dec63df612a487accf48af2 (patch)
treeccb7195ec74dcba7d0682be75bc893473cf6fc54 /railties/guides/source
parent7b15629b932a42fbf100666220d662c864f5244e (diff)
downloadrails-a5713147558648429dec63df612a487accf48af2.tar.gz
rails-a5713147558648429dec63df612a487accf48af2.tar.bz2
rails-a5713147558648429dec63df612a487accf48af2.zip
fix font formats and code examples indentation
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/testing.textile34
1 files changed, 17 insertions, 17 deletions
diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile
index ca9b10bbd6..8d7d73b487 100644
--- a/railties/guides/source/testing.textile
+++ b/railties/guides/source/testing.textile
@@ -146,14 +146,14 @@ NOTE: For more information on Rails <i>scaffolding</i>, refer to "Getting Starte
When you use +rails generate scaffold+, for a resource among other things it creates a test stub in the +test/unit+ folder:
-<pre>
+<shell>
$ rails generate scaffold post title:string body:text
...
create app/models/post.rb
create test/unit/post_test.rb
create test/fixtures/posts.yml
...
-</pre>
+</shell>
The default test stub in +test/unit/post_test.rb+ looks like this:
@@ -702,24 +702,24 @@ class UserFlowsTest < ActionController::IntegrationTest
private
- module CustomDsl
- def browses_site
- get "/products/all"
- assert_response :success
- assert assigns(:products)
- end
+ module CustomDsl
+ def browses_site
+ get "/products/all"
+ assert_response :success
+ assert assigns(:products)
end
+ end
- def login(user)
- open_session do |sess|
- sess.extend(CustomDsl)
- u = users(user)
- sess.https!
- sess.post "/login", :username => u.username, :password => u.password
- assert_equal '/welcome', path
- sess.https!(false)
- end
+ def login(user)
+ open_session do |sess|
+ sess.extend(CustomDsl)
+ u = users(user)
+ sess.https!
+ sess.post "/login", :username => u.username, :password => u.password
+ assert_equal '/welcome', path
+ sess.https!(false)
end
+ end
end
</ruby>