• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
BDD de fuera a dentro
 

BDD de fuera a dentro

on

  • 921 views

 

Statistics

Views

Total Views
921
Views on SlideShare
904
Embed Views
17

Actions

Likes
2
Downloads
9
Comments
0

6 Embeds 17

http://localhost:3000 8
http://paper.li 3
https://twitter.com 2
http://coderwall.com 2
http://twitter.com 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    BDD de fuera a dentro BDD de fuera a dentro Presentation Transcript

    • 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
    • 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
    • $ 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 page.has_content?(paul)end
    • $ 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 page.has_content?(paul)end
    • describe users/index.html.erb do it renders the list of users do render_view :users => [mock(:name => Joe)] assert_contains rendered, Joe endend
    • describe users/index.html.erb do it renders the list of users do render_view :users => [mock(:name => Joe)] assert_contains rendered, Joe endend
    • describe users/index.html.erb do it renders the list of users do render_view :users => [mock(:name => Joe)] assert_contains rendered, Joe endend
    • <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 page.has_content?(paul)end
    • 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
    • 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
    • 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
    • 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
    • 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 page.has_content?(paul)end