Skip to content

Instantly share code, notes, and snippets.

@twinge
Created February 19, 2010 20:48
Show Gist options
  • Save twinge/309188 to your computer and use it in GitHub Desktop.
Save twinge/309188 to your computer and use it in GitHub Desktop.
1)
ActionController::RoutingError in 'PostsController with a guest does not allow a post to be disabled'
No route matches {:controller=>"posts", :topic_id=>123, :id=>567, :action=>"deactivate"}
./spec/controllers/posts_controller_spec.rb:146:
2)
ActionController::RoutingError in 'PostsController with an admin user disables a post'
No route matches {:controller=>"posts", :topic_id=>123, :id=>567, :action=>"deactivate"}
./spec/controllers/posts_controller_spec.rb:123:
3)
'PostsController with a logged in user displays the edit page for a user that can edit' FAILED
expected "edit", got redirected to "http://test.host/forum/123/posts"
./spec/controllers/posts_controller_spec.rb:55:
4)
Spec::Mocks::MockExpectationError in 'PostsController with a logged in user does not show the edit page for a user that can't edit'
Mock "Post_345" expected :editable_by? with (#<User id: 1, login: "username26", email: "[email protected]", encrypted_password: "dae424bff6714564e8e959b90f64ee6715932090", salt: "36991a4cee15e3076d3591eb139bf669686ad594", token: nil, token_expires_at: nil, email_confirmed: false, created_at: "2010-02-19 20:47:21", updated_at: "2010-02-19 20:47:21", admin: false, confirmation_token: "33be53080f2a138decf0a2e76963ff00e24f843a", remember_token: nil, press: false>) once, but received it 0 times
./spec/controllers/posts_controller_spec.rb:61:
5)
'PostsController with a logged in user updates a post for an authorized user' FAILED
expected redirect to "/forum/123/posts#post_345", got redirect to "http://test.host/forum/123/posts"
./spec/controllers/posts_controller_spec.rb:78:
6)
Spec::Mocks::MockExpectationError in 'PostsController with a logged in user does not update the posts for an unauthorized user'
Mock "Post_345" expected :editable_by? with (#<User id: 1, login: "username28", email: "[email protected]", encrypted_password: "dae424bff6714564e8e959b90f64ee6715932090", salt: "36991a4cee15e3076d3591eb139bf669686ad594", token: nil, token_expires_at: nil, email_confirmed: false, created_at: "2010-02-19 20:47:21", updated_at: "2010-02-19 20:47:21", admin: false, confirmation_token: "33be53080f2a138decf0a2e76963ff00e24f843a", remember_token: nil, press: false>) once, but received it 0 times
./spec/controllers/posts_controller_spec.rb:84:
7)
ActionController::RoutingError in 'PostsController with a logged in user is not deactivated by a non-admin'
No route matches {:controller=>"posts", :topic_id=>123, :id=>567, :action=>"deactivate"}
./spec/controllers/posts_controller_spec.rb:97:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment