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