Mike Mangino of Elevated Rails and I are joining forces to do a talk at The Rails Edge in Chicago in August. We’ll be talking about how to use RSpec and Selenium together to drive the development of Rails applications.

Hope to see you there!

3 Responses to “Speaking at The Rails Edge”

  1. Wincent Colaiuta
  2. forrestc
    forrestc Says:
    my question is very similar to this one, can rspec+selenium finally support this:
    
    context "Test create user" do
      specify "should create a user when given valid user information" do
        open '/admin/users'
        page.should_include "All Users" 
        click 'link=New User'
        fill {:users=>{:login=>'forrestc', :firstname=>'Forrest', :lastname=>'Cao'}}
        submit
        response.should redirect_to '/admin/users'
        page.should_include "forrestc" 
      end
    end
    
    
  3. David Chelimsky
    David Chelimsky Says:

    Syntactically, no. Functionally, yes:

    describe "User admin" do
      it "should create a user when given valid user information" do
        @browser.open '/admin/users'
        @browser.get_body_text.should include('All Users')
        @browser.click 'link=New User'
        @browser.type 'name=login', 'forrestc'
        @browser.type 'name=firstname', 'Forrest'
        @browser.type 'name=lastname', 'Cao'
        @browser.submit "//form[@action='/users']" 
        @browser.get_location.should == '/admin/users'
        @browser.get_body_text.should include('forrestc')
      end
    

    We’re not wrapping Ruby selenese with custom expectation matchers – just providing access to it.

Sorry, comments are closed for this article.