search for: albums_path

Displaying 2 results from an estimated 2 matches for "albums_path".

2008 Jan 21
8
Polymorphic URL helpers documentation and fixes
Yesterday I answered a question regarding polymorphic URL helpers on Core ML and noticed that the module has no documentation. I''ve documented it and rewritten unit tests using Mocha. I also optimized some of the code slightly (nothing major, though). The patch also includes two fixes by Geoff Buesing, who has done awesome work in this area in the past.
2008 May 10
4
Newbie: lambda do...end.should change(Model, :count).by(1). Doesn''t work
...th mocks, and in particula with the following code. Here''s the controller action: def create @album = Album.new(params[:album]) if @album.save flash[:notice] = "album saved" else flash[:notice] = "could not save album" end redirect_to albums_path end And here an excerpt of the spec I''m fighting with: describe "create" do before(:each) do login_as(:admin) @album = mock_model(Album, :save => true) Album.stub!(:new).and_return(@album) @params = { :title => ''a new title'&...