spec/page_rankr_spec.rb in PageRankr-3.0.2 vs spec/page_rankr_spec.rb in PageRankr-3.1.0
- old
+ new
@@ -18,15 +18,15 @@
it{ should include(:alexa_global) }
it{ should include(:compete) }
it{ should include(:google) }
end
- describe "#ranks" do
+ describe "#ranks", :focus => true do
describe "success" do
subject do
VCR.use_cassette(:success_ranks) do
- PageRankr.ranks("www.google.com")
+ PageRankr.ranks("http://www.google.com")
end
end
it{ should have_key(:alexa_us) }
it{ should have_key(:alexa_global) }
@@ -40,11 +40,11 @@
end
describe "failure" do
subject do
VCR.use_cassette(:failure_ranks) do
- PageRankr.ranks("please-dont-register-a-site-that-breaks-this-test.com")
+ PageRankr.ranks("http://please-dont-register-a-site-that-breaks-this-test.com")
end
end
it{ should have_key(:alexa_us) }
it{ should have_key(:alexa_global) }
@@ -69,11 +69,11 @@
describe "#backlinks" do
describe "success" do
subject do
VCR.use_cassette(:success_backlinks) do
- PageRankr.backlinks("www.google.com")
+ PageRankr.backlinks("http://www.google.com")
end
end
PageRankr.backlink_trackers.each do |tracker|
it{ should have_key(tracker) }
@@ -85,17 +85,20 @@
end
describe "failure" do
subject do
VCR.use_cassette(:failure_backlinks) do
- PageRankr.backlinks("please-dont-register-a-site-that-breaks-this-test.com")
+ PageRankr.backlinks("http://please-dont-register-a-site-that-breaks-this-test.com")
end
end
PageRankr.backlink_trackers.each do |tracker|
it{ should have_key(tracker) }
- it{ subject[tracker].should be_nil }
+
+ it "#{tracker} should have a nil value" do
+ subject[tracker].should be_nil
+ end
end
end
end
describe "#index_trackers" do
@@ -107,11 +110,11 @@
describe "#indexes" do
describe "success" do
subject do
VCR.use_cassette(:success_indexes) do
- PageRankr.indexes("www.google.com")
+ PageRankr.indexes("http://www.google.com")
end
end
PageRankr.index_trackers.each do |tracker|
it{ should have_key(tracker) }
@@ -123,16 +126,19 @@
end
describe "failure" do
subject do
VCR.use_cassette(:failure_indexes) do
- PageRankr.indexes("please-dont-register-a-site-that-breaks-this-test.com")
+ PageRankr.indexes("http://please-dont-register-a-site-that-breaks-this-test.com")
end
end
PageRankr.index_trackers.each do |tracker|
it{ should have_key(tracker) }
- it{ subject[tracker].should be_nil }
+
+ it "#{tracker} should have a nil value" do
+ subject[tracker].should be_nil
+ end
end
end
end
describe "::Site" do
\ No newline at end of file