Created
March 23, 2012 01:39
-
-
Save braidn/2166077 to your computer and use it in GitHub Desktop.
capybara head scratcher
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
And /^I should see "([^"]*)" using an id tag labeled "([^"]*)"$/ do |content, tag| | |
page.has_css?(tag) | |
page.has_content?(content) | |
end |
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
Given /^I am on the homepage$/ do | |
19 visit('/') | |
18 end | |
17 | |
16 When /^I follow "([^"]*)"$/ do |arg1| | |
15 click_link(arg1) | |
14 end | |
13 | |
12 When /^I fill in "([^"]*)" with "([^"]*)"$/ do |field, info| | |
11 fill_in(field, :with => info) | |
10 end | |
9 | |
8 When /^I press "([^"]*)"$/ do |button| | |
7 click_on(button) | |
6 end | |
5 | |
4 Then /^I am on the created product page$/ do | |
3 current_path.should == "/projects/1" | |
2 end | |
1 | |
0 And /^I should see "([^"]*)" using an id tag labeled "([^"]*)"$/ do |content | |
, tag| | |
1 page.has_css?(tag) | |
2 page.has_content?(content) | |
3 end |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Ticketee Rebuilt</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<% flash.each do |key, value| -%> | |
<div class="flash" id="<%= key %>"> | |
<%= value %> | |
</div> | |
<% end -%> | |
<%= yield %> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment