Module: ElabsMatchers::Matchers::OnlyInclude

Defined in:
lib/elabs_matchers/matchers/only_include.rb

Defined Under Namespace

Classes: OnlyIncludeMatcher

Instance Method Summary collapse

Instance Method Details

#only_include(*elements) ⇒ Object

Asserts if the array contains exactly the supplied elements. The order of the element do not have to match.

Example: [“foo”, “bar”].should only_include(“bar”, “foo”) [“foo”, “bar”].should_not only_include(“foo”)

Parameters:

  • elements (*Array)

    Comma seperated list of arguments



38
39
40
# File 'lib/elabs_matchers/matchers/only_include.rb', line 38

def only_include(*elements)
  OnlyIncludeMatcher.new(elements)
end