have_button(locator)
have_checked_field(locator)
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
| include Rails.application.routes.url_helpers | |
| default_url_options[:host] = "localhost" |
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 format_time_interval(from_time, to_time) | |
| seconds = (to_time - from_time).abs.round | |
| minutes, seconds = seconds.divmod(60) | |
| if minutes > 60 * 24 | |
| " " | |
| elsif minutes > 60 | |
| hours, minutes = | |
| " %2dh %2dm " % minutes.divmod(60) | |
| else | |
| " %2dm %2ds " % [minutes, seconds] |
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
| require "matrix" | |
| #First, you construct an adjacency matrix. An adjacency matrix is just a matrix of what is linking to what. | |
| #[0, 1, 1, 1, 1, 0, 1] | |
| #[1, 0, 0, 0, 0, 0, 0] | |
| #[1, 1, 0, 0, 0, 0, 0] | |
| #[0, 1, 1, 0, 1, 0, 0] | |
| #[1, 0, 1, 1, 0, 1, 0] | |
| #[1, 0, 0, 0, 1, 0, 0] |