Sha256: 1bc86b37a72da08f9285e24053ad96ac87fc5b8b2df6cf239aa944747a1535a2
Contents?: true
Size: 623 Bytes
Versions: 4
Compression:
Stored size: 623 Bytes
Contents
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 except 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
4 entries across 4 versions & 1 rubygems