Sha256: 65fe81f31584d3f8bb4d6624e9e147a3d01432047a1385efead0cb4f21f5395e
Contents?: true
Size: 668 Bytes
Versions: 1
Compression:
Stored size: 668 Bytes
Contents
require "spec/autorun" require "watirsplash" 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watirsplash-0.1.9 | spec/spec_match_array_spec.rb |