elm-city-craftworks/practicing-ruby-web — pull request #163 by sandal (2013-08-23 17:11:09+00:00)
Title: Refactor simulated user

This migrates our simulated user object to a fluent interface rather than using `instance_eval`. It should help make scoping issues more obvious.

I use a proxy object to implement the method chaining, mainly to avoid having to write the word self at the end of each method definition. I also override `SimulatedUser.new` to return a proxy... if that gets weird we can simplify later by moving that logic up into the `simulated_user` helper, but I thinks it's somewhat safe.

For the most part migrating the tests themselves went smoothly, although there are still a couple oddities in places. But it's all green!