Sha256: bca61a4b84af9569ef6c2820426a4d48bde51c668f5316c0bc0a45aab2d496ae

Contents?: true

Size: 610 Bytes

Versions: 2

Compression:

Stored size: 610 Bytes

Contents

require 'spec_helper'

describe NpbHeadline do
  describe NpbHeadline::Parameters do
    let(:params) { NpbHeadline::Parameters.new(['carp']) }

    it 'should return equivalent id' do
      expect(params.team_id).to eq 6
    end
  end

  describe NpbHeadline::Base do
    describe '#articles' do
      let(:articles) { NpbHeadline::Base.new(6).articles }

      it 'should return correct size' do
        expect(articles.size).to eq 10
      end

      it 'should include correct link' do
        expect(articles[0][:link]).to match /^http:\/\/headlines\.yahoo\.co\.jp\/hl\?a=.*$/
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
npb_headline-0.0.2 spec/npb_headline_spec.rb
npb_headline-0.0.1 spec/npb_headline_spec.rb