Sha256: 5289093f79bdd20b10e7cf4530e13d20621ab06df33f542f5cb1691c956ddacc
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
# encoding: utf-8 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 have_autolinked_url(url)} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redaranj-twitter-text-1.0.4.191 | spec/regex_spec.rb |