I'm currently running the unit tests of my RoR application with Rspec. One of my controllers should return a HTTP status 500 when it can not write a new entity to the database. I wish to test this behaviour and would like temporarily to mark my database is read-only.
Does anyone know if it is possible to do this?
I tried the technique mentioned in "How do I prepare test database(s) for Rails rspec tests without running rake spec?", but this approach does not work for me (since the controller reads from the database before writing to it).