Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TwatsController < ApplicationController
- def new
- @twat = Twat.new
- end
- end
- require 'spec_helper'
- describe TwatsController do
- describe "#new" do
- it "instantiate a new twat" do
- twat = mock('My first Twat')
- Twat.should_receive(:new).and_return(twat)
- get :new
- end
- end
- end
Add Comment
Please, Sign In to add comment