garysweaver / activerecord-be_readonly

Makes read-only models easier to implement in ActiveRecord 3.x/4.x.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there any plan to support test mode?

Martin288 opened this issue · comments

Thanks for the convenient library. I am using it and it works very well but only I can not find a way to disable it under some special cases, e.g. generating testing data for testing. Is it possible to allow it works normally under development but does nothing under test.

In v0.1.0. Use BeReadonly.enabled = false in your test_helper.rb/spec_helper.rb.