spec/people/vkontakte_spec.rb in social_profile-0.1.4 vs spec/people/vkontakte_spec.rb in social_profile-0.2.0

- old
+ new

@@ -1,18 +1,23 @@ -# encoding: utf-8 require 'spec_helper' describe SocialProfile::People::Vkontakte do it "should be a Module" do SocialProfile::People.should be_a(Module) end - context "facebook" do + context "vkontakte" do before(:each) do @user = SocialProfile::Person.get(:vkontakte, "123456789", "abc") + stub_request(:get, "https://api.vk.com/method/users.get?access_token=abc&fields=counters&uids=123456789"). + to_return(:status => 200, :body => File.read(SocialProfile.root_path.join('spec/mock_json/vkontakte/friends_count.json'))) end - it "should be a facebook profile" do + it "should be a vkontakte profile" do @user.should be_a(SocialProfile::People::Vkontakte) + end + + it "should response to friends_count" do + @user.friends_count.should > 0 end end end