spec/page_rankr_spec.rb in PageRankr-3.1.1 vs spec/page_rankr_spec.rb in PageRankr-3.1.2
- old
+ new
@@ -21,11 +21,11 @@
end
describe "#ranks", :focus => true do
describe "success" do
subject do
- VCR.use_cassette(:success_ranks) do
+ VCR.use_cassette(:success_ranks, :record => :new_episodes) do
PageRankr.ranks("http://www.google.com")
end
end
it{ should have_key(:alexa_us) }
@@ -39,11 +39,11 @@
it{ subject[:google].should be_in(0..10) }
end
describe "failure" do
subject do
- VCR.use_cassette(:failure_ranks) do
+ VCR.use_cassette(:failure_ranks, :record => :new_episodes) do
PageRankr.ranks("http://please-dont-register-a-site-that-breaks-this-test.com")
end
end
it{ should have_key(:alexa_us) }
@@ -68,11 +68,11 @@
end
describe "#backlinks" do
describe "success" do
subject do
- VCR.use_cassette(:success_backlinks) do
+ VCR.use_cassette(:success_backlinks, :record => :new_episodes) do
PageRankr.backlinks("http://www.google.com")
end
end
PageRankr.backlink_trackers.each do |tracker|
@@ -84,11 +84,11 @@
end
end
describe "failure" do
subject do
- VCR.use_cassette(:failure_backlinks) do
+ VCR.use_cassette(:failure_backlinks, :record => :new_episodes) do
PageRankr.backlinks("http://please-dont-register-a-site-that-breaks-this-test.com")
end
end
PageRankr.backlink_trackers.each do |tracker|
@@ -109,11 +109,11 @@
end
describe "#indexes" do
describe "success" do
subject do
- VCR.use_cassette(:success_indexes) do
+ VCR.use_cassette(:success_indexes, :record => :new_episodes) do
PageRankr.indexes("http://www.google.com")
end
end
PageRankr.index_trackers.each do |tracker|
@@ -125,11 +125,11 @@
end
end
describe "failure" do
subject do
- VCR.use_cassette(:failure_indexes) do
+ VCR.use_cassette(:failure_indexes, :record => :new_episodes) do
PageRankr.indexes("http://please-dont-register-a-site-that-breaks-this-test.com")
end
end
PageRankr.index_trackers.each do |tracker|
@@ -142,10 +142,10 @@
end
end
describe "::Site" do
[nil, '', 'batman.thedarkknight'].each do |value|
- it "should raise an exception when given #{value}" do
+ it "should raise an exception when given #{value.inspect}" do
expect{PageRankr::Site(value)}.should raise_error(PageRankr::DomainInvalid)
end
end
end
end
\ No newline at end of file