Skip to content

Instantly share code, notes, and snippets.

@adkron
Created January 10, 2009 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adkron/45380 to your computer and use it in GitHub Desktop.
Save adkron/45380 to your computer and use it in GitHub Desktop.
require 'test_helper'
class PeopleIntegrationTest < ActionController::IntegrationTest
use_transactional_fixtures = false
context "context no records" do
setup do
Person.create!(:name => 'Mike Gaffney')
visit(people_path)
click_link("Create New")
fill_in('Name', :with => "Amos King")
click_button('Create')
end
should 'respond with success' do
assert_contain 'Amos King'
end
should 'have xpath div' do
assert_have_xpath '//div'
end
should 'have selector' do
assert_have_selector '#people-content'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment