Sha256: aba60fe8a9cd26dc25fc853abcece32710e7a933c1e67e97381286692e4fa6f2
Contents?: true
Size: 995 Bytes
Versions: 2
Compression:
Stored size: 995 Bytes
Contents
require "nnmClub_api" require "mechanize" describe "NnmClub" do describe "#torrents" do before { @query = "ruby on rails" agent = NnmClub::NnmClub_api.new.agent @search = NnmClub::Search.new(@query,agent) } it "should return array" do expect(@search.torrents.class).to eq([].class) end it "should retur array of 3 elements" do expect(@search.torrents.length).to eq(3) end end describe "Torrent" do before { @torrent_id = "728159" agent = NnmClub::NnmClub_api.new.agent @torrent = NnmClub::Torrent.find(@torrent_id,agent) } it "should return @description" do expect(@torrent.class).to eq({}.class) end it "should return image" do expect(@torrent[:image].empty?).to eq(false) end it "should return content" do expect(@torrent[:content].empty?).to eq(false) end it "should return link" do expect(@torrent[:magnet].empty?).to eq(false) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nnmClub_api-0.1.4 | spec/nnmcluv_api_spec.rb |
nnmClub_api-0.1.3 | spec/nnmcluv_api_spec.rb |