require "spec_helper" describe PlataformaSocial::Ranking::General do describe "Platform Route" do it "return correct url" do PlataformaSocial::Ranking::General.socialp_route.should == "http://ranking.dev.plataformasocial.com.br" end end describe "GET full ranking" do before :all, :vcr do @ranking = PlataformaSocial::Ranking::General.new @ranking.create({ :user_reference => 1, :points => 3 }) @ranking.create({ :user_reference => 2, :points => 2 }) @ranking.create({ :user_reference => 3, :points => 1 }) @ranking.create({ :user_reference => 4, :points => 4 }) end it "return all ranking", :vcr do @ranking.get["users"].count.should be(4) end end end