Sha256: 78d34b42f5aa88ad9bd3ef7e155fd150d6ceddb8af61fc6e13d724d9a9046da2
Contents?: true
Size: 622 Bytes
Versions: 13
Compression:
Stored size: 622 Bytes
Contents
require File.join(File.dirname(__FILE__), '../spec_helper.rb') describe Link do before do @good_link = "URL: google.com\n\nThis should be the description." @bad_link = "Rating: 4\nItem: Dyson\n\nThis should be the description." class Yellow; end Object.send(:remove_const, :Yellow) end should "detect a well-formed link" do Link.detect?(@good_link).should.be.true end should "not detect a malformed link" do Link.detect?(@bad_link).should.be.false end should "autodetect a well-formed link" do PostType.auto_detect(@good_link).should.be.kind_of Link end end
Version data entries
13 entries across 13 versions & 1 rubygems