Sha256: 7310aade636edf1f9f7380653b7bddeda8e4dcd8785ef4ae03a27fbfb00d4c95
Contents?: true
Size: 717 Bytes
Versions: 4
Compression:
Stored size: 717 Bytes
Contents
require 'spec_helper' module Plutus describe EntriesController do # Run these tests if you enable routing in your rails app. See README #def mock_entry(stubs={}) #@mock_entry ||= mock_model(Entry, stubs) #end #describe "GET index" do #it "assigns all entries as @entries" do #Entry.stub(:find).with(:all).and_return([mock_entry]) #get :index #assigns[:entries].should == [mock_entry] #end #end #describe "GET show" do #it "assigns the requested entry as @entry" do #Entry.stub(:find).with("37").and_return(mock_entry) #get :show, :id => "37" #assigns[:entry].should equal(mock_entry) #end #end end end
Version data entries
4 entries across 4 versions & 1 rubygems