[rspec-users] File creation

ben rooney ben.rooney62 at googlemail.com
Thu Apr 22 09:28:52 EDT 2010


I have a model that generates the authorization_rules.rb for
declarative_auth. I am not sure how I can go about testing the model -
apart from anything I don't want my test to over-write the file - so,
er, I am not quite sure how to go about it.

I *could* have some sort of sniffer in my model to see if I am in the
Test environment and generate a different file, but putting code into
my model to pass tests doesn't seem a very, well, sensible thing to
do.

Anyone been there, done that?

Ben


More information about the rspec-users mailing list