scenario List of users do  create_user mary  create_user paul  visit users_page  assert page.has_content?(mary)  assert pa...
scenario List of users do  create_user mary  create_user paul  visit users_page  assert page.has_content?(mary)  assert pa...
$ rails g model User name:string
scenario List of users do  create_user mary  create_user paul  visit users_page  assert page.has_content?(mary)  assert pa...
$ rails g controller users index
scenario List of users do  create_user mary  create_user paul  visit users_page  assert page.has_content?(mary)  assert pa...
describe users/index.html.erb do it renders the list of users do      render_view :users => [mock(:name => Joe)]      asse...
describe users/index.html.erb do it renders the list of users do      render_view :users => [mock(:name => Joe)]      asse...
describe users/index.html.erb do it renders the list of users do      render_view :users => [mock(:name => Joe)]      asse...
<h2>Users</h2><ul>  <%= @users.each do |user| %>  <li>    <%= user.name %>  </li>  <% end %></ul>
<h2>Users</h2><ul>  <%= @users.each do |user| %>  <li>    <%= user.name %>  </li>  <% end %></ul>
<h2>Users</h2><ul>  <%= @users.each do |user| %>  <li>    <%= user.name %>  </li>  <% end %></ul>
scenario List of users do  create_user mary  create_user paul  visit users_page  assert page.has_content?(mary)  assert pa...
describe UsersController do describe GET index do      it assigns the users do       User.stub(:all => users_stub)       g...
describe UsersController do describe GET index do      it assigns the users do       User.stub(:all => users_stub)       g...
describe UsersController do describe GET index do      it assigns the users do       User.stub(:all => users_stub)       g...
describe UsersController do describe GET index do      it assigns the users do       User.stub(:all => users_stub)       g...
class UsersController  def index    @users = User.all  endend
class UsersController  def index    @users = User.all  endend
scenario List of users do  create_user mary  create_user paul  visit users_page  assert page.has_content?(mary)  assert pa...
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
Upcoming SlideShare
Loading in...5
×

BDD de fuera a dentro

812

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
812
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

BDD de fuera a dentro

  1. 1. scenario List of users do create_user mary create_user paul visit users_page assert page.has_content?(mary) assert page.has_content?(paul)end
  2. 2. scenario List of users do create_user mary create_user paul visit users_page assert page.has_content?(mary) assert page.has_content?(paul)end
  3. 3. $ rails g model User name:string
  4. 4. scenario List of users do create_user mary create_user paul visit users_page assert page.has_content?(mary) assert page.has_content?(paul)end
  5. 5. $ rails g controller users index
  6. 6. scenario List of users do create_user mary create_user paul visit users_page assert page.has_content?(mary) assert page.has_content?(paul)end
  7. 7. describe users/index.html.erb do it renders the list of users do render_view :users => [mock(:name => Joe)] assert_contains rendered, Joe endend
  8. 8. describe users/index.html.erb do it renders the list of users do render_view :users => [mock(:name => Joe)] assert_contains rendered, Joe endend
  9. 9. describe users/index.html.erb do it renders the list of users do render_view :users => [mock(:name => Joe)] assert_contains rendered, Joe endend
  10. 10. <h2>Users</h2><ul> <%= @users.each do |user| %> <li> <%= user.name %> </li> <% end %></ul>
  11. 11. <h2>Users</h2><ul> <%= @users.each do |user| %> <li> <%= user.name %> </li> <% end %></ul>
  12. 12. <h2>Users</h2><ul> <%= @users.each do |user| %> <li> <%= user.name %> </li> <% end %></ul>
  13. 13. scenario List of users do create_user mary create_user paul visit users_page assert page.has_content?(mary) assert page.has_content?(paul)end
  14. 14. describe UsersController do describe GET index do it assigns the users do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end endend
  15. 15. describe UsersController do describe GET index do it assigns the users do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end endend
  16. 16. describe UsersController do describe GET index do it assigns the users do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end endend
  17. 17. describe UsersController do describe GET index do it assigns the users do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end endend
  18. 18. class UsersController def index @users = User.all endend
  19. 19. class UsersController def index @users = User.all endend
  20. 20. scenario List of users do create_user mary create_user paul visit users_page assert page.has_content?(mary) assert page.has_content?(paul)end
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×