Sha256: 65a96aed0e3a35635d0ed6c33def5b03eb94fb4ee3caf7ecccc32d3b7095266c
Contents?: true
Size: 1.04 KB
Versions: 16
Compression:
Stored size: 1.04 KB
Contents
require "spec_helper" describe WildcardMatchers::Matchers::IsUri do [ [ "http://example.com", :is_uri ], [ "http://example.com", :is_uri, :scheme => "http", :host => "example.com" ], [ "http://example.com", :is_uri, :host => /example/ ], ].each do |actual, matcher, *args| it_behaves_like "wildcard match", actual, matcher, *args end [ [ "http://example.com", :is_uri, :host => "google.com" ], [ "http://example.com", :is_uri, :host => /google/ ], ].each do |actual, matcher, *args| it_behaves_like "not wildcard match", actual, matcher, *args end context "when you use addressable, :query_values also available" do [ [ "http://example.com/?hoge=fuga", :is_uri, :query_values => { "hoge" => /fu/ } ], ].each do |actual, matcher, *args| it_behaves_like "wildcard match", actual, matcher, *args end [ [ "http://example.com/?hoge=fuga", :is_uri, :query_values => { "hoge" => /ho/ } ], ].each do |actual, matcher, *args| it_behaves_like "not wildcard match", actual, matcher, *args end end end
Version data entries
16 entries across 16 versions & 1 rubygems