class SignupTest < ActionController::IntegrationTest
def test_trial_account_sign_up
visit home_path
click_link "Sign up"
fill_in "Email", :with => "go...@example.com"
select "Free account"
click_button "Register"
end
end
require "webrat" Webrat.configure do |config| config.mode = :rails end
Whats confusing me is that ActionController::IntegrationTest is
defined in the Rails API, but there are no methods like "visit",
"click_link", & co. visit() is defined in Webrat::Session, but how
can it be called in this example without it's invocation being
qualified as in Webrat::Session.visit()? What am I missing here?
The RSpec book is well worth it. Kent Beck also has an oldish book on test-driven development you may find helpful. It uses Java and jUnit, but the practices, especially the red/green/refactor loop, remain basically the same between TDD and BDD.
As for generated docs, gem serve --daemon is quite helpful.
On Sep 29, 2009 1:00 AM, "lsiden" <lsi...@gmail.com> wrote:
Thanks. I finally found this page that actually offers some
documentation on using Mechanize: http://mechanize.rubyforge.org/mechanize/GUIDE_rdoc.html
BTW - Is there a central place to look for docs on all this stuff?
When I installed mechanize w/ gem, command output said it was building
rDocs and ri, but when I enter "ri mechanize" at command line, it
returns "Nothing known about mechanize".
Next I want to figure out how to use this with rspec so that I can
start to develop tests.
I think I need to get a book. I think someone mentioned this one:
http://www.pragprog.com/titles/achbd/the-rspec-book Does anyone
second that recommendation? I want to make sure it's going to help
before I fork over $24 for the beta e-book.
On Sep 28, 12:19 pm, Mike Sassak <msas...@gmail.com> wrote:
> On Sun, Sep 27, 2009 at 10:15 PM, lsiden <lsi...@gmail.com> wrote: > > > Anybody use webrat? I wa...
> > fill_in "Email", :with => "g...@example.com"
> > select "Free account" > > click_button "Register" > > end > > end > > > Whats confusing m...
RubyGems Documentation Index
Summary
There are 21 gems installed:
Awesome! Thanks! :)