Jay Fields

Rails: Acceptance Testing


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
My current team has 2 QA roles. The QA developers are responsible for creating a acceptance suite that ensures that each story is completed without breaking...

TDD: Removing test noise


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
Consider the following expectations:expect 4 do Math.plus(2,2)endexpect ActiveRecord::Base.to_recieve(:execute).with("insert ...") do Person.saveendIn...

Ruby Evaluation options article on InfoQ


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
Yesterday, I published a fairly long article on InfoQ about Evaluation Options in Ruby. The article covers eval, instance_eval, class_eval and provides...

Ruby: Validatable


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
I finished up the 1.1.0 release this morning of Validatable. Validatable is a module that you can mix into your classes to add validations.class Person...

Rails Model View Controller Presenter?


~12 years ago by Jay Fields on Jay Fields Thoughts.
Ruby on Rails directs you to use Model View Controller by convention. This often results in a one to many relationship between Controllers and Views. ...

Ruby: Forwardable addition


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
Almost every project I work on ends up using the Forwardable module included in the Ruby Standard Library. In fact, I use it so often I thought it was worth...

Ruby: Invoking a method with a &parameter


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
On a few ocassions recently I've been asked what the & does when it is used in the context of a method invocation parameter. For example, consider the following...

Class Definitions


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
One of the things that makes Ruby very interesting to me is the ability to do things that I previously could not do in C#. For example, Ruby has open classes...

Adding Validations to any Class


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
On my current project we have data that needs to be collected and then sent to a service. This data needs to be validated, but since it is never put into...

Appending to ERB output from a block declaration


almost 12 years ago by Jay Fields on Jay Fields Thoughts.
I've recently been writing up some material and using ERB to handle the majority of my formatting needs. For example, the code below shows what my template...