Sha256: c5e2fe194ee005f260ff5d24dc981564bc8669a5e29dacdc4c4e3b796d82cdcb
Contents?: true
Size: 902 Bytes
Versions: 3
Compression:
Stored size: 902 Bytes
Contents
require File.dirname(__FILE__) + '/../../test_helper.rb' class TestNytimes::TestMovies::TestLink < Test::Unit::TestCase context "Link.create" do setup do @url = 'http://foo.com' @type = 'article' @suggest_text = 'Suggested Text' @link = Nytimes::Movies::Link.create_from_api('url' => @url, 'type' => @type, 'suggested_link_text' => @suggest_text) end should "return an object of type Nytimes::Movies::Link" do assert_kind_of(Nytimes::Movies::Link, @link) end should "assign the @url attribute from the 'url' key in the hash" do assert_equal(@url, @link.url) end should "assign the @link_type attribute from the 'type' key in the hash" do assert_equal(@type, @link.link_type) end should "assign the @suggested_text attribute from the 'suggested_link_text' key in the hash" do assert_equal(@suggest_text, @link.suggested_text) end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
harrisj-nytimes-movies-0.1.0 | test/nytimes/movies/test_link.rb |
harrisj-nytimes-movies-0.1.1 | test/nytimes/movies/test_link.rb |
nytimes-movies-0.1.1 | test/nytimes/movies/test_link.rb |