diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 5690652..4d4768d 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,4 +1,15 @@ -

- <%= gravatar_for @user %> - <%= @user.name %> -

\ No newline at end of file + + + + + +
+

+ <%= gravatar_for @user %> + <%= @user.name %> +

+
+ diff --git a/public/stylesheets/custom.css b/public/stylesheets/custom.css index b19edb1..53b1209 100644 --- a/public/stylesheets/custom.css +++ b/public/stylesheets/custom.css @@ -111,3 +111,27 @@ footer { footer nav { float: none; } + +/* User show page */ + +table.profile { + width: 100%; + margin-bottom: 0; +} + +td.main { + width: 70%; + padding: 1em; +} + +td.sidebar { + width: 30%; + padding: 1em; + vertical-align: top; + background: #ffc; +} + +.profile img.gravatar { + border: 1px solid #999; + margin-bottom: -15px; +} \ No newline at end of file diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index dcdc571..6b1afb9 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -33,6 +33,12 @@ get :show, :id => @user response.should have_selector('h1>img', :class => "gravatar") end + + it "should have the right URL" do + get :show, :id => @user + response.should have_selector('td>a', :content => user_path(@user), + :href => user_path(@user)) + end end describe "GET 'new'" do