[rspec-users] Upgrade problems/questions regarding RSpec 1.3.0 to 2.0.1

David Chelimsky dchelimsky at gmail.com
Fri Nov 5 08:10:57 EDT 2010

On Nov 4, 2010, at 7:18 PM, Jarmo Pertman wrote:

> Upgrade to RSpec 2.x has been more painful than i expected. A lot more
> painful.
> Subject#subject behavior with "self" is also broken!
> This fails in RSpec 2 with stack overflow:
> describe "something" do
>  subject { self }
>  it "is ok?" do
>    should be_ok
>  end
>  def ok?
>    true
>  end
> end
> It is passing in RSpec 1.3. See the original discussion of that
> feature that i myself suggested/needed
> http://groups.google.com/group/rspec/browse_thread/thread/89d6dd78b8f76df7/21109b78fc61a0e6
> It also seems to me that the #subject specs provided with the patch
> for 1.x have been deleted also during some refactoring or something.

rspec-core-2 was a complete rewrite, so it's not that specs or code were deleted, just not all were forward ported.

> At least i couldn't find the specs testing that explicit functionality
> from rspec-core. They still exist at 1.x repo though
> https://github.com/dchelimsky/rspec/blob/master/spec/spec/example/example_methods_spec.rb

These were largely about a module re-opening issue. I added a github issue for that: https://github.com/rspec/rspec-core/issues/issue/210 but I'm not sure it solves your need. If you don't think it will, please report this one as well to https://github.com/rspec/rspec-core/issues.

> I'm really sorry if some of the problems in this thread are already
> fixed in master, but i couldn't see any open bugs relating to any of
> the problems described here.

I don't think any of these issues have been reported. Most of the problems you're encountering have to do with unconventional use, which is why they haven't come up before.

Thanks again for all the feedback.


> Waiting for some solutions-explanations how to solve most of the
> problems hopefully.

More information about the rspec-users mailing list