Sha256: d0ab229ab9f8858df249410010e8b299c8bfe28d42993d792de86ede61e7f95f
Contents?: true
Size: 931 Bytes
Versions: 1
Compression:
Stored size: 931 Bytes
Contents
require 'spec_helper' describe ANN_Wrapper do describe "#fetch_anime" do context "valid id is provided" do it "returns an ANN_Anime object" do anime = ANN_Wrapper.fetch_anime(11770) anime.should be_an_instance_of ANN_Anime end end context "an invalid id is provided" do it "returns an ANN_Error object" do anime = ANN_Wrapper.fetch_anime(117700) anime.should be_an_instance_of ANN_Error end end end describe "#fetch_titles" do context "valid parameters privided" do it "returns Array of ANN_Reports" do reports = ANN_Wrapper.fetch_titles reports.should be_an_instance_of Array reports.each do |r| r.should be_an_instance_of (ANN_Report) end end end context "invalid parameters provided" do it "returns an empty Array" do anime = ANN_Wrapper.fetch_titles 34 anime.should be_an_instance_of Array anime.size.should == 0 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ann_wrapper-1.1.4 | spec/ann_wrapper_spec.rb |