0.02
No commit activity in last 3 years
No release in over 3 years
Description: simplifies congiguration and run of acceptance tests.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

AcceptanceTest - This gem simplifies configuration and run of acceptance tests

Installation

Add this line to to your Gemfile:

gem "acceptance_test"

And then execute:

$ bundle

Usage

Without selenium configuration

Your spec class:

require 'acceptance_test'

describe 'Google Search' do

  include_context "AcceptanceTest"

  before :all do
    acceptance_test.app_host = "http://www.google.com"
  end

  it "uses selenium driver", driver: :selenium, exclude: false do
    visit('/')

    fill_in "q", :with => "Capybara"

    #save_and_open_page

    find("#gbqfbw button").click

    all(:xpath, "//li[@class='g']/h3/a").each { |a| puts a[:href] }
  end
end

With selenium configuration

Your spec class:

require 'acceptance_test'

describe 'Google Search' do

  include_context "AcceptanceTest"

  before :all do
    selenium_config_file = "spec/features/selenium.yml"
    selenium_config_name = "test"

    acceptance_test.load_selenium_config selenium_config_file, selenium_config_name
  end

  it "do something" do
    # ...
  end
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request