Created
July 20, 2011 11:00
-
-
Save urfolomeus/1094759 to your computer and use it in GitHub Desktop.
Example of using Capybara with RSpec to check the class and content of a table cell
This file contains 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
require 'spec_helper' | |
describe "daemons/index.html.erb", :type => :request do | |
before :each do | |
assign( :daemons, { 'test' => :up } ) | |
render | |
end | |
it "has the correct class" do | |
rendered.should have_css('table tr td.daemon-up') | |
end | |
it "has the correct content" do | |
rendered.should have_content('Up') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment