Sha256: aa9810c2001a28a5645f580a1f22e5451fc717cf360e23beef42bd1b7848219b
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
require 'spec_helper' describe AccountsController do # Run these tests if you enable routing in your rails app. See README #def mock_account(stubs={}) #@mock_account ||= mock_model(Account, stubs) #end #describe "GET index" do #it "assigns all accounts as @accounts" do #Account.stub(:find).with(:all).and_return([mock_account]) #get :index #assigns[:accounts].should == [mock_account] #end #end #describe "GET show" do #it "assigns the requested account as @account" do #Account.stub(:find).with("37").and_return(mock_account) #get :show, :id => "37" #assigns[:account].should equal(mock_account) #end #end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blawzoo-plutus-0.5.3 | spec/controllers/accounts_controller_spec.rb |