From 2c4e384a065c339ec7f9bbe4a3f1925e7240e29c Mon Sep 17 00:00:00 2001 From: Yomi Colledge Date: Sat, 19 Jun 2010 23:40:22 +0100 Subject: [PATCH] Spec file seems to be missing from other branch, something to do with netbeans --- .../application_controller_spec.rb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 spec/controllers/application_controller_spec.rb diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb new file mode 100644 index 00000000..b794dd93 --- /dev/null +++ b/spec/controllers/application_controller_spec.rb @@ -0,0 +1,26 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe ApplicationController do + + controller_name :projects + + describe "GET, new" do + it "should render the no sidebar layout" do + get :new + response.should use_layout("no_sidebar") + end + end + + describe "POST, create" do + before(:each) do + @project = mock_model(Project).as_new_record.as_null_object + @project.stub!(:save).and_return false + Project.stub!(:new).and_return @project + end + + it "should render the no sidebar layout" do + post :create + response.should use_layout("no_sidebar") + end + end +end \ No newline at end of file