Skip to content

Commit

Permalink
it should terminate if there's an error...
Browse files Browse the repository at this point in the history
  • Loading branch information
godfat committed Nov 20, 2014
1 parent 55875bb commit fb1af1e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/facebook/test_page.rb
Expand Up @@ -67,15 +67,17 @@
f.for_pages(data, pages, {}, kind){ |r|
r.should.eq expects.shift
}
f.wait until expects.empty?
f.wait
expects.should.empty?

# this data cannot be merged
stub_request(:get, 'zzz').to_return(:body => '{"data":"y"}')
expects = [data, {'data' => 'y'}, nil]
f.for_pages(data, pages, {}, kind){ |r|
r.should.eq expects.shift
}
f.wait until expects.empty?
f.wait
expects.should.empty?
}

stub_request(:get, 'zzz').to_return(:body =>
Expand All @@ -87,7 +89,8 @@
f.for_pages(data, 3, {}, kind){ |r|
r.should.eq expects.shift
}
f.wait until expects.empty?
f.wait
expects.should.empty?
}
end
end

0 comments on commit fb1af1e

Please sign in to comment.