From 3bd0c47b9baa040031a7d4c0868e327adbb1ecac Mon Sep 17 00:00:00 2001 From: Dhruv Kapadia Date: Tue, 11 May 2010 16:52:18 -0400 Subject: [PATCH] Temporarily removing hoptoad deploy notification --- deploy/after_restart.rb | 2 +- spec/controllers/items_controller_spec.rb | 131 ----------------------------------------------------------------------------------------------------------------------------------- 2 files changed, 1 insertion(+), 132 deletions(-) delete mode 100644 spec/controllers/items_controller_spec.rb diff --git a/deploy/after_restart.rb b/deploy/after_restart.rb index 17c6223..d6bd3b3 100644 --- a/deploy/after_restart.rb +++ b/deploy/after_restart.rb @@ -1 +1 @@ -run "cd #{release_path} && rake hoptoad:deploy TO=#{node[:environment][:framework_env]} USER=#{node[:owner_name]} REVISION=#{`cat #{release_path}/REVISION`}" +#run "cd #{release_path} && rake hoptoad:deploy TO=#{node[:environment][:framework_env]} USER=#{node[:owner_name]} REVISION=#{`cat #{release_path}/REVISION`}" diff --git a/spec/controllers/items_controller_spec.rb b/spec/controllers/items_controller_spec.rb deleted file mode 100644 index 31096fe..0000000 --- a/spec/controllers/items_controller_spec.rb +++ /dev/null @@ -1,131 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') - -describe ItemsController do - - def mock_item(stubs={}) - @mock_item ||= mock_model(Item, stubs) - end - - describe "GET index" do - it "assigns all items as @items" do - Item.stub!(:find).with(:all).and_return([mock_item]) - get :index - assigns[:items].should == [mock_item] - end - end - - describe "GET show" do - it "assigns the requested item as @item" do - Item.stub!(:find).with("37").and_return(mock_item) - get :show, :id => "37" - assigns[:item].should equal(mock_item) - end - end - - describe "GET new" do - it "assigns a new item as @item" do - Item.stub!(:new).and_return(mock_item) - get :new - assigns[:item].should equal(mock_item) - end - end - - describe "GET edit" do - it "assigns the requested item as @item" do - Item.stub!(:find).with("37").and_return(mock_item) - get :edit, :id => "37" - assigns[:item].should equal(mock_item) - end - end - - describe "POST create" do - - describe "with valid params" do - it "assigns a newly created item as @item" do - Item.stub!(:new).with({'these' => 'params'}).and_return(mock_item(:save => true)) - post :create, :item => {:these => 'params'} - assigns[:item].should equal(mock_item) - end - - it "redirects to the created item" do - Item.stub!(:new).and_return(mock_item(:save => true)) - post :create, :item => {} - response.should redirect_to(item_url(mock_item)) - end - end - - describe "with invalid params" do - it "assigns a newly created but unsaved item as @item" do - Item.stub!(:new).with({'these' => 'params'}).and_return(mock_item(:save => false)) - post :create, :item => {:these => 'params'} - assigns[:item].should equal(mock_item) - end - - it "re-renders the 'new' template" do - Item.stub!(:new).and_return(mock_item(:save => false)) - post :create, :item => {} - response.should render_template('new') - end - end - - end - - describe "PUT update" do - - describe "with valid params" do - it "updates the requested item" do - Item.should_receive(:find).with("37").and_return(mock_item) - mock_item.should_receive(:update_attributes).with({'these' => 'params'}) - put :update, :id => "37", :item => {:these => 'params'} - end - - it "assigns the requested item as @item" do - Item.stub!(:find).and_return(mock_item(:update_attributes => true)) - put :update, :id => "1" - assigns[:item].should equal(mock_item) - end - - it "redirects to the item" do - Item.stub!(:find).and_return(mock_item(:update_attributes => true)) - put :update, :id => "1" - response.should redirect_to(item_url(mock_item)) - end - end - - describe "with invalid params" do - it "updates the requested item" do - Item.should_receive(:find).with("37").and_return(mock_item) - mock_item.should_receive(:update_attributes).with({'these' => 'params'}) - put :update, :id => "37", :item => {:these => 'params'} - end - - it "assigns the item as @item" do - Item.stub!(:find).and_return(mock_item(:update_attributes => false)) - put :update, :id => "1" - assigns[:item].should equal(mock_item) - end - - it "re-renders the 'edit' template" do - Item.stub!(:find).and_return(mock_item(:update_attributes => false)) - put :update, :id => "1" - response.should render_template('edit') - end - end - - end - - describe "DELETE destroy" do - it "destroys the requested item" do - Item.should_receive(:find).with("37").and_return(mock_item) - mock_item.should_receive(:destroy) - delete :destroy, :id => "37" - end - - it "redirects to the items list" do - Item.stub!(:find).and_return(mock_item(:destroy => true)) - delete :destroy, :id => "1" - response.should redirect_to(items_url) - end - end - -end -- libgit2 0.21.2