#191 ✓out-of-date
Simon de Boer

Installation with RSpec (documentation)

Reported by Simon de Boer | March 9th, 2009 @ 04:06 PM

It is necessary to add include Webrat::Methods to the Spec::Runner.configure section of the spec_helper.rb in order to have the specs contain direct method calls.

Without this you get undefined method errors.

This is in addition to the following code, that is in the documentation I have seen.


require 'webrat' unless defined?(Webrat)
Webrat.configure do |config|
    config.mode = :rails
end

Relevant version info: dchelimsky-rspec (1.1.99.13) dchelimsky-rspec-rails (1.1.99.13) rails (2.2.2) webrat (0.4.2)

Comments and changes to this ticket

  • Simon de Boer

    Simon de Boer March 9th, 2009 @ 04:07 PM

    Better formatting...My spec_helper now has this fragment.

    
    require 'webrat' unless defined?(Webrat)
    Webrat.configure do |config|
        config.mode = :rails
    end
    
    Spec::Runner.configure do |config|
      include Webrat::Methods
    ...
    
  • gaffo

    gaffo May 7th, 2009 @ 04:41 PM

    • Tag changed from documentation, rails, rspec to documentation, rails, rspec, stale, verify
    • State changed from “new” to “open”

    Simon, It's been a while so I'm just checking to see if this is still relevant to the new versions of webrat and rspec?

    Thanks

  • gaffo

    gaffo June 3rd, 2009 @ 10:37 AM

    • State changed from “open” to “out-of-date”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Pages