[rspec-users] Constant resolution fails in describes inside of modules using rspec 2 on ruby 1.9.1

Myron Marston myron.marston at gmail.com
Thu Nov 4 13:29:15 EDT 2010


You can reorganize it a bit in a way that will work on 1.8.7, 1.9.1
and 1.9.2:


module Foo
  module Quux
    class Baz
      def name
        "noise"
      end
    end
  end
end

describe Foo::Quux::Baz do
  it "has a name" do
    described_class.new.name.should == 'noise'
  end
end


More information about the rspec-users mailing list