test/facebook/test_handler.rb in rest-more-3.2.0 vs test/facebook/test_handler.rb in rest-more-3.3.0
- old
+ new
@@ -5,11 +5,11 @@
after do
WebMock.reset!
end
describe 'log method' do
- should 'log whenever doing network request' do
+ would 'log whenever doing network request' do
stub_request(:get, 'https://graph.facebook.com/me').
to_return(:body => '{}')
logger = []
rg = RC::Facebook.new(:log_method => lambda{ |s| logger << [s] })
@@ -27,16 +27,16 @@
stub_request(:get, 'https://graph.facebook.com/me').
to_return(:body => @error)
end
- should 'call error_handler if error occurred' do
+ would 'call error_handler if error occurred' do
RC::Facebook.new(:error_handler => @id).get('me').
should.eq @error_hash
end
- should 'raise ::RC::Facebook::Error in default error_handler' do
+ would 'raise ::RC::Facebook::Error in default error_handler' do
begin
RC::Facebook.new.get('me').tap{}
rescue ::RC::Facebook::Error => e
e.error .should.eq @error_hash
e.message.should.eq \
@@ -63,15 +63,15 @@
RC::Middleware.escape(@bad_fql_query)}"
stub_request(:get, bad_fql_request).to_return(:body => @fql_error)
end
- should 'call error_handler if error occurred' do
+ would 'call error_handler if error occurred' do
RC::Facebook.new(:error_handler => @id).fql(@bad_fql_query).
should.eq @fql_error_hash
end
- should 'raise ::RC::Facebook::Error in default error_handler' do
+ would 'raise ::RC::Facebook::Error in default error_handler' do
begin
RC::Facebook.new.fql(@bad_fql_query).tap{}
rescue ::RC::Facebook::Error => e
e.error .should.eq @fql_error_hash
e.message.should.start_with?(