-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Emilio Gutter edited this page Mar 30, 2017
·
17 revisions
- Equivalence: 'eq' matcher
- Collection membership: 'include' matcher
- Collection size: 'be_empty', 'have_items' matchers
- Regex: 'match' matcher
- Expecting errors: 'raise_error' matcher
- Comparisons: 'be_greater_than', 'be_greater_or_equal_than', 'be_less_than', 'be_less_or_equal_than', 'start_with', 'end_with' matchers
expect any_type, to: eq(another)
expect any_type, to_not: eq(another)
expect a_float, to: eq(another)
within: delta
expect a_float, to_not: eq(another)
within: delta
expect a_string, to: include(substring)
expect a_string, to_not: include(substring)
expect a_list, to: include(element)
expect a_list, to_not: include(element)
expect a_range, to: include(element)
expect a_range, to_not: include(element)
expect a_map_or_tuple, to: include(key)
expect a_map_or_tuple, to_not: include(key)
expect a_map, to: include(key)
with: value
expect a_map, to_not: include(key)
with: value
expect a_string, to: be_empty()
expect a_string, to_not: be_empty()
expect a_map_or_tuple, to: be_empty()
expect a_map_or_tuple, to_not: be_empty()
expect a_list, to: be_empty()
expect a_list, to_not: be_empty()
expect a_range, to: be_empty()
expect a_range, to_not: be_empty()
expect a_list, to: have_items(number)
expect a_list, to_not: have_items(number)
expect a_range, to: have_items(number)
expect a_range, to_not: have_items(number)
expect a_map_or_tuple, to: have_items(number)
expect a_map_or_tuple, to_not: have_items(number)
expect a_string, to: have_items(number)
expect a_string, to_not: have_items(number)
expect a_string, to: match(regex)
expect a_string, to_not: match(regex)
expect a_function, to: raise_error(an_error)
expect a_function, to: raise_error(an_error)
with: a_message
expect a_number, to: be_less_than(another)
expect a_number, to_not: be_less_than(another)
expect a_number, to: be_less_or_equal_than(another)
expect a_number, to_not: be_less_or_equal_than(another)
expect a_number, to: be_greater_than(another)
expect a_number, to_not: be_greater_than(another)
expect a_number, to: be_greater_or_equal_than(another)
expect a_number, to_not: be_greater_or_equal_than(another)
expect a_string, to: start_with(another)
expect a_string, to_not: start_with(another)
expect a_list, to: start_with(another)
expect a_list, to_not: start_with(another)
expect a_range, to: start_with(another)
expect a_range, to_not: start_with(another)
expect a_string, to: end_with(another)
expect a_string, to_not: end_with(another)
expect a_list, to: end_with(another)
expect a_list, to_not: end_with(another)
expect a_range, to: end_with(another)
expect a_range, to_not: end_with(another)