I have a class that takes a class that inherits from activerecord as a parameter, e.g.:
class SomeModel < ActiveRecord::Base end class MyClass attr_accessor :model def initialize(model) @model = model end end The class MyClass will then iterate over the Models attributes etc. Also I will need to know each attributes data type in mysql like: integer, boolean, etc. So my unit tests shouldnt' rely on the database, but I'm a little confused on how I can create stub/mock that will have attributes on it similiar to how it would be if I was creating a model and it reading the mysql columns as attributes. Thoughts on how I can do this w/o actually having to depend on a database for my spec tests?
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users