Does ActiveRecord make Ruby on Rails code hard to test?
Posted
by Erik Öjebo
on Stack Overflow
See other posts from Stack Overflow
or by Erik Öjebo
Published on 2010-04-18T17:57:37Z
Indexed on
2010/04/18
18:03 UTC
Read the original article
Hit count: 469
I've spent most of my time in statically typed languages (primarily C#). I have some bad experiences with the Active Record pattern and unit testing, because of the static methods and the mix of entities and data access code.
Since the Ruby community probably is the most test driven of the communities out there, and the Rails ActiveRecord seems popular, there must be some way of combining TDD and ActiveRecord based code in Ruby on Rails.
I would guess that the problem goes away in dynamic languages, somehow, but I don't see how. So, what's the trick?
© Stack Overflow or respective owner