spec/rubytter_spec.rb in rubytter-0.4.2 vs spec/rubytter_spec.rb in rubytter-0.4.3
- old
+ new
@@ -102,9 +102,23 @@
it 'should respond to followers_ids' do
@rubytter.should_receive(:get).with('/followers/ids/test', {})
@rubytter.followers_ids('test')
end
+ it 'should respond to http_request' do
+ @rubytter.should_receive(:http_request) {|req, param_str| param_str.should == 'status=test'}
+ @rubytter.update_status(:status => 'test')
+ end
+
+ it 'should respond to search' do
+ @rubytter.should_receive(:http_request) {|req, param_str, host| host.should == 'search.twitter.com'}
+ @rubytter.search('test')
+ end
+
+ it 'should respond to to_param_str' do
+ @rubytter.to_param_str(:page => 2, :foo => 'bar').should == 'foo=bar&page=2'
+ end
+
it 'should create struct from json' do
hash = {
:a => 'a',
'b' => 1,
1 => 'a',