Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

  • Blog Navigation
NY Standup 7/19/2011: Fruit Rollups

Interesting Things

  • Two-Subject Monte: Consider the following RSpec code:

    describe "fruit" do
      let(:subject) { "banana" }
      context "rounder" do
        subject { "orange" }
        it { should == "orange" }

    Does it pass? The answer is no. The implicit subject evaluates to “banana” from the let(:subject) { } at the top, and is not overridden by the subject { } later on. This can be considered a bug in RSpec, but it’s also pretty weird to assign subject with let(). This was a mistake which RSpec should probably warn you about.

  • CSV fixtures are gone in Rails Edge, and will presumably be gone in 3.1. No announcement of this is available at press time, but the code for it is gone. Incidentally, CSV fixtures also don’t preserve whitespace at the beginning or end of each of your values. If you’re using them, this would be a great time to move to YAML fixtures.

Share This