Sha256: efa135a940e0d3d5c363f61c6bfa5172e78e11cf68254cfb1d83c14d61dbe429
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
require File.join(File.dirname(__FILE__), "/../spec_helper" ) module Rumblr describe Tumblelog, 'instances' do it 'should have the attributes of a Tumblelog' do Tumblelog.new.should respond_to( :name, :timezone, :cname, :title, :url, :avatar_url, :is_primary, :type, :private_id) end it "' posts should initialize empty" do Tumblelog.new.posts.should be_a_kind_of(Array) end end describe Tumblelog, 'finder' do describe 'provided a valid URL' do it 'should successfully retrieve a tumblelog' do mock_successful(:anonymous_read) log = Tumblelog.find_by_url('valid_url') log.should be_an_instance_of(Tumblelog) end it 'should retrieve a tumblelog with posts' do mock_successful(:anonymous_read) log = Tumblelog.find_by_url('valid_url') log.posts.first.should be_a_kind_of(Post) log.posts.first.type.should_not be_nil end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jamescallmebrent-rumblr-0.0.0 | spec/rumblr/tumblelog_spec.rb |
jamescallmebrent-rumblr-0.0.1 | spec/rumblr/tumblelog_spec.rb |