Commit 42ae92c9
Changed files (3)
app
views
layouts
spec
app/views/layouts/application.html.erb
@@ -26,10 +26,12 @@
<div class="grid_3 push_9 search">
<%= form_tag(search_index_path, :method => "get", :name => "search") do %>
<input type="submit" value="" />
- <input name="q" type="text" />
+ <input name="q" type="text" placeholder="search" />
<% end %>
</div>
<div class="clear"></div>
+
+
<div class="info">
<div class="grid_3 dull">
<strong class="fright" style='font-family:"Julee", cursive;font-size: 1.5em;color:pink;'>crazy, delicious...</strong>
@@ -48,6 +50,23 @@
<% end %>
</div>
</div>
+
+
+ <div style="background: #fff;">
+ <div class="grid_6">
+ <%= form_tag(search_index_path, :method => "get", :name => "search") do %>
+ <input name="q" type="text" placeholder="search" />
+ <input type="submit" value="" />
+ <% end %>
+ </div>
+ <div class="grid_2"> My Creations </div>
+ <div class="grid_2"> Artist </div>
+ <div class="grid_2"> Help </div>
+ <div class="clear" />
+ </div>
+
+
+
</div>
</div><!-- /#hd -->
spec/controllers/categories_controller_spec.rb
@@ -1,30 +1,12 @@
require 'spec_helper'
-# This spec was generated by rspec-rails when you ran the scaffold generator.
-# It demonstrates how one might use RSpec to specify the controller code that
-# was generated by Rails when you ran the scaffold generator.
-#
-# It assumes that the implementation code is generated by the rails scaffold
-# generator. If you are using any extension libraries to generate different
-# controller code, this generated spec may or may not pass.
-#
-# It only uses APIs available in rails and/or rspec-rails. There are a number
-# of tools you can use to make these specs even more expressive, but we're
-# sticking to rails and rspec-rails APIs to keep things simple and stable.
-#
-# Compared to earlier versions of this generator, there is very limited use of
-# stubs and message expectations in this spec. Stubs are only used when there
-# is no simpler way to get a handle on the object needed for the example.
-# Message expectations are only used when there is no simpler way to specify
-# that an instance is receiving a specific message.
-
describe CategoriesController do
- # This should return the minimal set of attributes required to create a valid
- # Category. As you add validations to Category, be sure to
- # update the return value of this method accordingly.
def valid_attributes
- {}
+ {
+ :name => 'blah',
+ :slug => 'blah'
+ }
end
describe "GET index" do
@@ -38,7 +20,7 @@ describe CategoriesController do
describe "GET show" do
it "assigns the requested category as @category" do
category = Category.create! valid_attributes
- get :show, :id => category.id.to_s
+ get :show, :id => category.slug.to_s
assigns(:category).should eq(category)
end
end
spec/controllers/creations_controller_spec.rb
@@ -20,7 +20,8 @@ describe CreationsController do
describe "GET index" do
it "assigns all creations as @creations" do
- Creation.stub(:page) { [mock_creation] }
+ relation = mock(ActiveRecord::Relation, :per => [mock_creation])
+ Creation.stub(:page) { relation }
get :index
assigns(:creations).should eq([mock_creation])
end