Sha256: 7c60b3c595562e749a5a4ddcd168fe3572dccbe29546f936ae1860b6c7319c46
Contents?: true
Size: 1023 Bytes
Versions: 10
Compression:
Stored size: 1023 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe TopicsController do dataset :forums before do Page.current_site = sites(:test) if defined? Site controller.stub!(:request).and_return(request) end describe "on get to index" do describe "with html format" do before do get :index end it "should render the topic list" do response.should be_success response.should render_template("index") end end end describe "on get to show" do before do @topic = topics(:older) get :show, :id => topic_id(:older), :forum_id => forum_id(:public) end it "should render the show template" do response.should be_success response.should render_template("show") end end [:new, :edit, :update, :create, :destroy].each do |action| it "should fail #{action} requests" do lambda { get action, :id => forum_id(:public) }.should raise_error ActionController::RoutingError end end end
Version data entries
10 entries across 10 versions & 1 rubygems