Sha256: 174f4a84fe94db84c692c4717de3d2968f8d9ae91ca8797b4aac3dfc689cffc6

Contents?: true

Size: 447 Bytes

Versions: 4

Compression:

Stored size: 447 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe Reddit::Comment do
  before do
    @comment = Reddit::Comment.new({
      'ups' => 5,
      'downs' => 6,
      'replies' => {'data' => {'children' => [
          {'data' => {'ups' => 1, 'downs' => 6}}
        ]}}
    })
  end
  
  it "should have replies" do
    @comment.replies.should_not be_nil
  end
  
  it "should calculate its score" do
    @comment.score.should == -1
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bterlson-reddit-0.1.0 spec/comment_spec.rb
bterlson-reddit-0.2.0 spec/comment_spec.rb
bterlson-reddit-0.2.1 spec/comment_spec.rb
bterlson-reddit-0.3.0 spec/comment_spec.rb