Sha256: ed522298db9ee3841ced7b92dbed052837e29c4d189a37d7509e40fe31a56c8c
Contents?: true
Size: 648 Bytes
Versions: 2
Compression:
Stored size: 648 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe "Twitter::Regex regular expressions" do describe "matching URLS" do TestUrls::VALID.each do |url| it "should match the URL #{url}" do url.should match_autolink_expression end it "should match the URL #{url} when it's embedded in other text" do text = "Sweet url: #{url} I found. #awesome" url.should match_autolink_expression_in(text) end end end describe "invalid URLS" do it "does not link urls with invalid characters" do TestUrls::INVALID.each {|url| url.should_not match_autolink_expression} end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twitter-text-1.1.2 | spec/regex_spec.rb |
twitter-text-1.1.1 | spec/regex_spec.rb |