Skip to content

Commit

Permalink
Update users_controller_spec.rb
Browse files Browse the repository at this point in the history
fixes issue padrinobook#2 I think
  • Loading branch information
MatzFan committed Dec 15, 2014
1 parent a416c3a commit 82f079e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions spec/app/controllers/users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
describe "GET edit" do
let(:user) { build(:user) }

xit "render the view for editing a user" do
User.should_receive(:find_by_id).at_least(:once).with(anything()).and_return(user)

get "/users/#{user.id}/edit"
# I come to this point but the last response is not okay but and routing error
it "render the view for editing a user" do
id = user.id
User.should_receive(:find_by_id).at_least(:once).and_return(user)
get "/users/#{id}/edit", {}, { 'rack.session' => { current_user: id } }
last_response.should be_ok
end

Expand Down

0 comments on commit 82f079e

Please sign in to comment.