I have some simple rspec tests that check开发者_Go百科 if a particular page's title is 'xxxx'.
I added some before_filter's to my application_controller which makes db calls.
Should I be mocking these out somehow?
The tests are failing saying "mysql2::error table myapp_test.articles doesn't exist.
That sounds more like you need to run rake db:test:prepare
or rake db:migrate db:test:prepare
to me. Do you have something set up so your rspecs fail when they hit the database intentionally?
精彩评论