Sha256: 807e7fe7aa63db84d5d2a61ae21fab49110748ce27c85cd72d539f264e14d8fb
Contents?: true
Size: 486 Bytes
Versions: 1
Compression:
Stored size: 486 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' describe Reddit::User do before do @user = Reddit::User.new('radhruin') end it "should know its url" do @user.url.should == Reddit::PROFILE_URL.gsub('[username]', 'radhruin') end it "should fetch the user's comments" do mock_comment = mock(Reddit::Comment) @user.should_receive(:get_resources).and_return([mock_comment, mock_comment]) @user.comments.should == [mock_comment, mock_comment] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bterlson-reddit-0.3.0 | spec/user_spec.rb |