spec/rubytter_spec.rb in jugyo-rubytter-0.4.8 vs spec/rubytter_spec.rb in jugyo-rubytter-0.5.0
- old
+ new
@@ -140,11 +140,11 @@
lambda { @rubytter.to_param_str(:bar) }.should raise_error(ArgumentError)
end
it 'should set default header' do
rubytter = Rubytter.new('test', 'test')
- rubytter.header.should == {'User-Agent', "#{APP_NAME}/#{VERSION} (#{HOMEPAGE})"}
+ rubytter.header.should == {'User-Agent', "Rubytter/#{VERSION} (http://github.com/jugyo/rubytter)"}
end
it 'should able to set custom header 1' do
rubytter = Rubytter.new('test', 'test',
{
@@ -190,7 +190,12 @@
struct.e[1].c.should == 3
lambda {struct.x}.should raise_error(NoMethodError)
lambda {struct.regex}.should raise_error(NoMethodError)
end
+ it 'should be set app_name' do
+ rubytter = Rubytter.new('test', 'teat', :app_name => "Foo")
+ rubytter.should_receive(:__update_status).with({:status => 'test', :source => "Foo"})
+ rubytter.update('test')
+ end
end
end