spec/page_rankr_spec.rb in PageRankr-4.1.1 vs spec/page_rankr_spec.rb in PageRankr-4.2.0

- old
+ new

@@ -45,10 +45,11 @@ subject{ PageRankr.rank_trackers } it{ should include(:alexa_us) } it{ should include(:alexa_global) } it{ should include(:google) } + it{ should include(:moz_rank) } end describe "#ranks", :focus => true do describe "success" do subject do @@ -59,15 +60,19 @@ it{ should have_key(:alexa_us) } it{ should have_key(:alexa_global) } it{ should have_key(:alexa_country) } it{ should have_key(:google) } - + it{ should have_key(:moz_rank) } + it{ should have_key(:page_authority) } + it{ subject[:alexa_us].should be_number >= 1 } it{ subject[:alexa_global].should be_number >= 1 } it{ subject[:alexa_country].should be_number >= 1 } it{ subject[:google].should be_in(0..10) } + it{ subject[:moz_rank].should be_in(5..9) } + it{ subject[:page_authority].should be_in(90..99) } end describe "failure" do subject do VCR.use_cassette(:failure_ranks, :record => :new_episodes) do @@ -77,14 +82,18 @@ it{ should have_key(:alexa_us) } it{ should have_key(:alexa_global) } it{ should have_key(:alexa_country) } it{ should have_key(:google) } - + it{ should have_key(:moz_rank) } + it{ should have_key(:page_authority) } + it{ subject[:alexa_us].should be_nil } it{ subject[:alexa_global].should be_nil } it{ subject[:alexa_country].should be_nil } it{ subject[:google].should be_nil } + it{ subject[:moz_rank].should == 0 } + it{ subject[:page_authority].should == 1 } end end describe "#backlink_trackers" do subject{ PageRankr.backlink_trackers } \ No newline at end of file