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
@doc """ | |
Asserts that the given changeset is invalid, and that when the | |
assertion_expression is applied to the error_message it results in a truthy | |
value. | |
""" | |
defmacro assert_invalid(changeset, field, assertion_expression) when is_atom(field) do | |
expr = Macro.to_string(assertion_expression) | |
quote do | |
error_messages = unquote(changeset) |
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
def use_selenium_driver driver | |
$__capybara_selenium_driver_name = driver | |
end | |
def selenium_driver | |
$__capybara_selenium_driver_name || :firefox | |
end | |
def (Capybara::Driver::Selenium).driver | |
unless @driver |