Module: Calabash::Cucumber::QueryHelpers
- Included in:
- Core
- Defined in:
- lib/calabash-cucumber/query_helpers.rb
Overview
A module of methods that can help you construct queries.
Instance Method Summary collapse
-
#escape_quotes(str) ⇒ String
call this method to properly escape single quotes in Calabash queries Calabash iOS has some annoying rules for text containing single quotes.
Instance Method Details
#escape_quotes(str) ⇒ String
call this method to properly escape single quotes in Calabash queries Calabash iOS has some annoying rules for text containing single quotes. This helper frees you from manual escaping.
15 16 17 |
# File 'lib/calabash-cucumber/query_helpers.rb', line 15 def escape_quotes(str) str.gsub("'", "\\\\'") end |