Skip to content

Instantly share code, notes, and snippets.

@evolve2k
Created December 7, 2009 06:25
Show Gist options
  • Save evolve2k/250666 to your computer and use it in GitHub Desktop.
Save evolve2k/250666 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment