Skip to content

Instantly share code, notes, and snippets.

@happyrobots
Created April 21, 2013 14:04
Show Gist options
  • Save happyrobots/5429693 to your computer and use it in GitHub Desktop.
Save happyrobots/5429693 to your computer and use it in GitHub Desktop.
# spec/features/home_controller_spec.rb
require 'spec_helper'
describe HomeController do
describe "index" do
it "should check title page" do
visit '/home'
# puts "#{page.html}"
page.should have_content('I can has')
page.should have_selector('p', text: "I can has a content")
# Capybara.string(page.body).has_selector?('title', text: 'TitleMatcher | Yohoho')
page.should have_title("TitleMatcher | Yohoho")
# page.should have_selector('title', text: "TitleMatcher | Yohoho")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment