{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/3e50edec642d6b3ed1dec90c7b91a25c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3e50edec642d6b3ed1dec90c7b91a25c","url":"https://api.github.com/users/findchris","login":"findchris","id":1185},"assignee":null,"updated_at":"2011-11-15T19:15:07Z","labels":[],"closed_at":"2011-07-26T13:27:17Z","comments":3,"url":"https://api.github.com/repos/thoughtbot/shoulda/issues/178","body":"Hi there.\r\n\r\nFor context, here is a gist with my Rails model, corresponding spec, and rspec output:\r\nhttps://gist.github.com/1098642\r\n\r\nThe issue seems to be caused by the definition of the 'before_validation' callback, as the problem goes away when that line is commented out.\r\n\r\nI have been looking into this for a while without much success.  Then again, I'm pretty tired and possibly missing something obvious, in which case I appreciate your second set of eyes.\r\n\r\nIs there reason that defining a before_validation callback might cause an issue for shoulda-matchers?  I'm on Rails 3.1.pre.\r\n\r\nThanks,\r\nChris","html_url":"https://github.com/thoughtbot/shoulda/issues/178","title":"shoulda-matchers and before_validation not compatible?","number":178,"id":1284107,"created_at":"2011-07-25T19:52:17Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/4fdbb8aa3568e47391a8fd6c6760de11?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4fdbb8aa3568e47391a8fd6c6760de11","url":"https://api.github.com/users/alhafoudh","login":"alhafoudh","id":43397},"updated_at":"2011-11-15T19:15:07Z","url":"https://api.github.com/repos/thoughtbot/shoulda/issues/comments/2749526","body":"So this happend when you create database model with :null => false, :default => 0 for example?","id":2749526,"created_at":"2011-11-15T19:15:07Z"}}