Guest User

Untitled

a guest
Jul 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class TwatsController < ApplicationController
  2.  
  3. def new
  4. @twat = Twat.new
  5. end
  6.  
  7. end
  8.  
  9. require 'spec_helper'
  10.  
  11.  
  12.  
  13. describe TwatsController do
  14.  
  15. describe "#new" do
  16. it "instantiate a new twat" do
  17. twat = mock('My first Twat')
  18. Twat.should_receive(:new).and_return(twat)
  19. get :new
  20. end
  21.  
  22. end
  23.  
  24. end
Add Comment
Please, Sign In to add comment