RSpec's context method is broken

RSpec's context (which is basically an alias for describe) takes over your whole application. No object may have its own context method, or you will always receive errors like

"No description supplied for example group declared on ~/project/app/..."

The easiest workarounds:

  • do not name any method context

  • use describe instead of context in your specs, and put this into your spec_helper.rb:

    Spec::DSL::Main.class_eval do
      if method_defined? :context
        undef :context
      end
    end
    
Tobias Kraze