rails-api/rails-api — pull request #45 by benmanns (2012-11-23 05:26:11+00:00)
Title: Fix test_helper for Ruby 1.8.

`Class.new` does not accept a block for evaluation in Ruby 1.8, so I replaced the block with a call to `class_eval`. This is wrapped in an `unless defined?` to keep the memoization functionality.

Before this change, running the test suite returned ``./test/test_helper.rb:10:in `app': undefined local variable or method `config' for # (NameError)``, which you can see in [Travis build 3.1 for Rails::API](https://travis-ci.org/rails-api/rails-api/jobs/3319620).