Cucumberex.Filter.NameFilter (cucumberex v0.2.1)

Copy Markdown View Source

Filter scenarios by name pattern.

Summary

Functions

Match a scenario name against a pattern (nil, substring, or regex).

Functions

matches?(name, pattern)

Match a scenario name against a pattern (nil, substring, or regex).

Examples

iex> Cucumberex.Filter.NameFilter.matches?("Eating cukes", nil)
true

iex> Cucumberex.Filter.NameFilter.matches?("Eating cukes", "cukes")
true

iex> Cucumberex.Filter.NameFilter.matches?("Eating cukes", "missing")
false

iex> Cucumberex.Filter.NameFilter.matches?("Eating cukes", ~r/^Eating/)
true