I’ve created a model, let’s just call it Person
attr_accessor :first_name, :lastname
@first_name + " " + @last_name
I’m using this in my Rails application. My Rails application does not
use a database of any kind, and this model is obviously not a subclass
of ActiveRecord::Base. I can’t unit test this class though because
Rails does all kinds of crap with setting up DB connections, loading
fixtures, etc. I’ve tried to get around this a number of ways, but
I’ve made a couple posts on this, with no response. I know I’m not
the first person in the world to create an app that doesn’t need a
database. I don’t want to scrap this whole project entirely, but I
have a very tough time coding if I can’t write tests, it’s too easy
for stuff to get out of control.
Can someone please give me some pointers on using Rails without a DB?