{"action":"opened","issue":{"url":"https://api.github.com/repos/UJKhokhar/bloccit/issues/11","labels_url":"https://api.github.com/repos/UJKhokhar/bloccit/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/UJKhokhar/bloccit/issues/11/comments","events_url":"https://api.github.com/repos/UJKhokhar/bloccit/issues/11/events","html_url":"https://github.com/UJKhokhar/bloccit/issues/11","id":61023142,"number":11,"title":"Failing specs","user":{"login":"chikamichi","id":106689,"avatar_url":"https://avatars.githubusercontent.com/u/106689?v=3","gravatar_id":"","url":"https://api.github.com/users/chikamichi","html_url":"https://github.com/chikamichi","followers_url":"https://api.github.com/users/chikamichi/followers","following_url":"https://api.github.com/users/chikamichi/following{/other_user}","gists_url":"https://api.github.com/users/chikamichi/gists{/gist_id}","starred_url":"https://api.github.com/users/chikamichi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikamichi/subscriptions","organizations_url":"https://api.github.com/users/chikamichi/orgs","repos_url":"https://api.github.com/users/chikamichi/repos","events_url":"https://api.github.com/users/chikamichi/events{/privacy}","received_events_url":"https://api.github.com/users/chikamichi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-13T09:39:00Z","updated_at":"2015-03-13T09:39:00Z","closed_at":null,"body":"Hey,\r\n\r\nWhen I run `rspec spec`, I have two failures reported:\r\n\r\n```\r\nFailures:\r\n\r\n  1) FavoritesController#create creates a favorite for the current user and specified post\r\n     Failure/Error: post :create, { post_id: @post_id }\r\n     ActionController::UrlGenerationError:\r\n       No route matches {:action=>\"create\", :controller=>\"favorites\", :post_id=>nil}\r\n     # ./spec/controllers/favorites_controller_spec.rb:18:in `block (3 levels) in <top (required)>'\r\n\r\n  2) FavoritesController#destroy destroys the favorite for the current user and post\r\n     Failure/Error: delete :destroy, { post_id: @post.id, id: favorite_id }\r\n     NameError:\r\n       undefined local variable or method `favorite_id' for #<RSpec::ExampleGroups::FavoritesController::Destroy:0x007f986200a8c8>\r\n     # ./spec/controllers/favorites_controller_spec.rb:29:in `block (3 levels) in <top (required)>'\r\n\r\nFinished in 0.74671 seconds (files took 2.16 seconds to load)\r\n23 examples, 2 failures, 3 pending\r\n\r\nFailed examples:\r\n\r\nrspec ./spec/controllers/favorites_controller_spec.rb:15 # FavoritesController#create creates a favorite for the current user and specified post\r\nrspec ./spec/controllers/favorites_controller_spec.rb:25 # FavoritesController#destroy destroys the favorite for the current user and post\r\n```\r\n\r\nThose are easily fixed.\r\n\r\nBe sure to run `rspec spec` before pushing to GitHub (and to fix any broken spec), this is a good habit!"}}