Created
May 1, 2012 09:29
-
-
Save nickboyce/2566740 to your computer and use it in GitHub Desktop.
Sample test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
require "rubygems" | |
require "selenium-webdriver" | |
require "awesome_print" | |
# allow colour in RSpec results | |
RSpec.configure do |config| config.color_enabled = true end | |
describe "The Easyart website" do | |
before(:all) do | |
# set up our driver and wait instances | |
@driver = Selenium::WebDriver.for(:firefox) | |
@wait = Selenium::WebDriver::Wait.new(:timeout => 10) | |
end | |
after(:all) do | |
# quit the browser after the tests run | |
@driver.quit | |
end | |
# let's start with an easy one... | |
it "should have a home page" do | |
# navigate to the page | |
@driver.get "http://www.easyart.com/" | |
# check the title is as expected | |
@driver.title.should == "Buy Art Prints, Canvas Prints, Framed Art at Easyart.com" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment