Sha256: c5e3f37afc26f1ab1e49896d89a3a0428c6a80db68eb1ca932d00417cadeaab2
Contents?: true
Size: 666 Bytes
Versions: 8
Compression:
Stored size: 666 Bytes
Contents
require "spec/autorun" require "watirspec" describe "Array match_array matcher" do it "matches other arrays with regexps" do expected_ary = ["1", "2", "3", /\d/] ["1", "2", "3", "5"].should match_array(expected_ary) expected_ary = ["1", ["2", /\d+/], /3/] ["1", [], "4"].should_not match_array(expected_ary) ["1", ["2", "55"], "3"].should match_array(expected_ary) end it "doesn't work with other objects than Array" do lambda {"".should match_array("")}.should raise_exception lambda {[].should match_array("")}.should raise_exception lambda {"".should match_array([])}.should raise_exception end end
Version data entries
8 entries across 8 versions & 1 rubygems