Sha256: dd33e58bcdb835455f0ec48efe52c65ad19deaec49cd086eeb09411a11d56917

Contents?: true

Size: 845 Bytes

Versions: 1

Compression:

Stored size: 845 Bytes

Contents

require 'rspec'
require 'spec_helper'

describe Simple2ch do
  context 'should get reses from board url' do
    before(:all) do
      board_name = 'ニュー速VIP'
      board_url = 'http://viper.2ch.sc/news4vip/'
      @board = Board.new board_name, board_url
      @threads= @board.threads
      @res = @threads[0].reses[0]
    end
    it{ expect(@board.threads).to be_a_kind_of Array }
    it do
      #@threads = board.threads
      expect(@board.threads.size).to be > 0
    end

    it { expect(@threads[0]).to be_a_kind_of Thre }
    it { expect(@threads[0].reses).to be_a_kind_of Array }

    it do
      #@res = @threads[0].reses[0]
      expect(@res).to be_a_kind_of Res
    end
    it { expect(@res.date).to be < Time.now }
    it { expect(@res.author_id.size).to be > 0 }

  end


#its(:reses){ is_expected.to be a_kind_of Array}
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple2ch-0.0.1 spec/simple2ch_spec.rb