Jay Fields

Rails: ActiveRecord Unit Testing part II


over 10 years ago by Jay Fields on Jay Fields Thoughts.
Back in December I wrote about unit testing ActiveRecord models. Following that post, we started using that pattern to unit test our models. It quickly...

Rails: How we test


~10 years ago by Jay Fields on Jay Fields Thoughts.
Last weekend, at The Rails Edge (which was fantastic), Mike Clark (jokingly) told me that there was enough buzz around "The Jay Fields Way of Testing" that...

Ruby: [Anti-pattern] Extract Module to shorten Class Definition


over 10 years ago by Jay Fields on Jay Fields Thoughts.
A Ruby module can be used to encapsulate a role that an object might play. For example, if an object wants to delegate, it can extend Forwardable.Unfortunately...

Rails: Use Ruby Schema syntax without using Migrations


over 10 years ago by Jay Fields on Jay Fields Thoughts.
I've touched on this topic a few times. I previously listed the pains of using Migrations. And, in my last post I gave an example of our solution. But...

Rails: Generating an Oracle DDL without Oracle installed


over 10 years ago by Jay Fields on Jay Fields Thoughts.
At my current project we are developing on Mac Minis and deploying to linux boxes. A fairly large problem with developing on Mac Minis is that there's no...

Ruby: Default method arguments to instance variables


over 10 years ago by Jay Fields on Jay Fields Thoughts.
Several projects ago I worked with Brent Cryder. One night over dinner, he told me that on occasion he would pass instance variables to instance methods...

Blogging: Blog as a skills assessment


over 10 years ago by Jay Fields on Jay Fields Thoughts.
When I joined ThoughtWorks, almost 2.5 years ago, I had a conversation with Paul Hammant where he said he always googles someone before he interviews them...

Ruby: Mocks and Stubs using Mocha


over 10 years ago by Jay Fields on Jay Fields Thoughts.
I've previously written about using Mocks and Stubs convey intent. When I was using C#, I believed this was the best solution for creating robust tests...

Ruby: Assigning instance variables in a constructor


over 10 years ago by Jay Fields on Jay Fields Thoughts.
Every time I assign an instance variable in a constructor I remember that I've been meaning to write something that takes care of it for me.class DomainObject...

Ruby: Class Methods


over 10 years ago by Jay Fields on Jay Fields Thoughts.
It's very common when moving from Java or C# to be weary of Ruby's class methods. Many people have written about how static methods are evil in C# and Java...