[rspec-users] [Proposal] deprecate context() at the top level

David Chelimsky dchelimsky at gmail.com
Fri Mar 13 09:24:36 EDT 2009

Hi all,

There are two tickets in lighthouse that point to problems with the
use of context() in RSpec:

* conflict with JRuby:


* request context() be deprecated


As there are a lot of people (and libraries) that mix and match
describe() and context(), I don't plan to simply remove it. However, a
couple of suggestions have come up that I'm considering. Here's the

== deprecate and eventually remove context() ONLY AT THE TOP LEVEL

In my personal use, and from what I've seen in other libraries that
are driven with RSpec, this is the common use of context():

  describe "Something" do
    context "in some context" do

You would *still be able to do that*, but you would *not be able to do this*:

  context "Something" do
    context "in some context" do


I'd like to know if you think removing context a the top level will
create conflicts with your code or libraries you use. Please comment
in http://rspec.lighthouseapp.com/projects/5645/tickets/713 instead of
here - I'd like to keep the conversation in one place, if possible.

Thanks for playing,

More information about the rspec-users mailing list