Sha256: 63961c919447329f46c7ec63017af5978550f2e3b3b7ee4c659fa53e431ebb5f

Contents?: true

Size: 597 Bytes

Versions: 4

Compression:

Stored size: 597 Bytes

Contents

require 'spec_helper'
require File.expand_path(File.dirname(__FILE__) + '/parser_helper')

module RubyHackernews
  describe EntryPageParser do

    before :each do
      @page = ParserHelper.full_page
    end

    describe :get_lines do
      it "should always return 60 elements" do
        lines = EntryPageParser.new(@page).get_lines
        lines.length.should == 60
      end
    end

    describe :get_next_url do
      it "should get the url in 'More' element" do
        url = EntryPageParser.new(@page).get_next_url
        url.should == "/x?fnid=9LO1ba1swy"
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-hackernews-1.4.0 spec/HNAPI/services/entries/parsers/entry_page_parser_spec.rb
ruby-hackernews-1.3.7 spec/HNAPI/services/entries/parsers/entry_page_parser_spec.rb
ruby-hackernews-1.3.6 spec/HNAPI/services/entries/parsers/entry_page_parser_spec.rb
ruby-hackernews-1.3.5 spec/HNAPI/services/entries/parsers/entry_page_parser_spec.rb