Created mongrel dont-serve-static patch ticket
If anyone’s interested, I’ve updated the patch for mongrel trunk (r949 / REL_1-1-3) and posted it here to the mongrel project
I’m hoping this get’s in. Am I too hopefull? :)
Mocking ActiveRecord::RecordInvalid with mocha
For future reference
1 2 3 4 5 6 7 8 |
def mock_record_invalid(model) user_errors, record_invalid_error = mock('errors'), mock('record_invalid_error') user_errors.stubs(:full_messages).returns([]) model.stubs(:errors).returns(user_errors) record_invalid_error.stubs(:exception).returns(ActiveRecord::RecordInvalid.new(model)) record_invalid_error end |
View archives for January 2008.