Need help with Rspec example
Can any one have more descriptive example of Rspec? I used the the example from site https://gist.github.com/1053934 works very fine. But i want to learn more like go to site X (eg. Google) -> enter data in text field (eg. Ruby) Check for the HTML is Ruby available in the list?
Can any one have script 开发者_JAVA技巧that i can run on Rspec and that will generate report on that pass fail status of case.
I appreciate all the responses in advance.
Here's a complete example, courtesy of Watir docs.
require "rubygems"
require "rspec"
describe "google.com" do
let(:browser) { @browser ||= Watir::Browser.new :firefox }
before { browser.goto "http://google.com" }
after { browser.close }
it "should search for watir" do
browser.text_field(:name => "q").set "watir"
browser.button.click
browser.div(:id => "resultStats").wait_until_present
browser.title.should == "watir - Google Search"
end
end
精彩评论