Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does rspec work with Rails 3 for integration tests?

What I'm trying to ahieve is to do integration tests with webrat in rails3 like Yehuda does with test-unit in http://pivotallabs.com/talks/76-extending-rails-3 minute 34.

an example:

describe SomeApp
  it "should show the index page"
    visit "/"
    body.should =~ /hello world/
  end
end

Does someone knows a way to do it?

like image 216
makevoid Avatar asked Dec 22 '22 06:12

makevoid


1 Answers

Have you tried using rspec-rails: http://github.com/rspec/rspec-rails

That is the repository (install instructions in the Readme) for the new RSpec 2.0 which will work with Rails 3.

like image 153
Bill Turner Avatar answered Dec 30 '22 06:12

Bill Turner