test-unit-capybara

Web site

Description

test-unit-capybara is a Capybara adapter for test-unit 2. You can get Capybara integrated Test::Unit::TestCase. It also provides useful assertions for Capybara.

Install


% sudo gem install test-unit-capybara

Usage


require 'test/unit/capybara'

class TestMyRackApplication < Test::Unit::TestCase
  include Capybara::DSL

  def setup
    Capybara.app = MyRackApplication.new
  end

  def test_top_page
    visit("/")
    assert_equal("Welcome!", find("title").text)
  end
end

License

LGPLv2.1 or later.

(Kouhei Sutou has a right to change the license including contributed patches.)

Authors

  • Kouhei Sutou