This file contains hidden or 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
| recipes: | |
| - setup | |
| - readme | |
| - gems | |
| - testing | |
| - controllers | |
| - routes | |
| - extras | |
| prefs: |
This file contains hidden or 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
| == Welcome to Rails | |
| Rails is a web-application framework that includes everything needed to create | |
| database-backed web applications according to the Model-View-Control pattern. | |
| This pattern splits the view (also called the presentation) into "dumb" | |
| templates that are primarily responsible for inserting pre-built data in between | |
| HTML tags. The model contains the "smart" domain objects (such as Account, | |
| Product, Person, Post) that holds all the business logic and knows how to | |
| persist themselves to a database. The controller handles the incoming requests |
This file contains hidden or 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
| urls = ["http://brigade.codeforamerica.org/index.html", "brigade.codeforamerica.org", "http://codeforamerica.org", "codeforamerica.org/index.html", "brigade.codeforamerica.org/index.html"] | |
| urls.each do |url| | |
| # clean up the URLs so they all start off with the same format | |
| if url.include?("http://") | |
| url.gsub!("http://","") | |
| end | |
| # we're only interested in the part that comes before the first slash, | |
| # so we split the string into the part before the slash, and the part after the slash | |
| a = url.split("/") |
This file contains hidden or 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
| def check_cell(prefix) | |
| if @final_count[0] == 1 | |
| final_cell = query "TableViewCell index:0" | |
| if final_cell.first["class"] == "UITableViewCell" | |
| sleep(STEP_PAUSE) | |
| else | |
| screenshot_and_raise "#{prefix} of the cells were deleted!" | |
| end | |
| else | |
| screenshot_and_raise "#{prefix} of the cells were deleted!" |
This file contains hidden or 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
| Then /^I swipe on cell number (\d+) in "([^\"]*)"$/ do |index, orientation| | |
| index = index.to_i | |
| screenshot_and_raise "Index should be positive (was: #{index})" if (index<=0) | |
| if orientation == "landscape" | |
| swipe("up", {:query => "tableViewCell index:#{index-1}"}) | |
| elsif orientation == "portrait" | |
| swipe("right", {:query => "tableViewCell index:#{index-1}"}) | |
| end | |
| sleep(STEP_PAUSE) | |
| end |
This file contains hidden or 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
| Then /^I swipe to delete all cells in "([^\"]*)"$/ do |orientation| | |
| total_rows = query("tableView index:0",numberOfRowsInSection:0) #this returns an array | |
| end_of_range = total_rows[0] - 1 | |
| (0..end_of_range).each do | |
| scroll_to_row "tableView index:0", 0 | |
| sleep(STEP_PAUSE) | |
| macro %Q[I swipe on cell number 1 in "#{orientation}"] #requires this custom step definition: https://gist.github.com/3298026 | |
| sleep(STEP_PAUSE) | |
| touch "TableViewCellDeleteConfirmationControl" | |
| end |
NewerOlder