Sha256: 5067c1e084542f153dc330aa03ba388431678e98740dd7107ceacce38dd44980
Contents?: true
Size: 892 Bytes
Versions: 12
Compression:
Stored size: 892 Bytes
Contents
require "spec_helper" describe SocialAvatarProxy::TwitterAvatar do subject do SocialAvatarProxy::TwitterAvatar.new(id) end context "with a valid user ID" do let(:id) { "2202971" } describe "#remote_url" do it "should return a valid URL" do result = URI(subject.remote_url) expect(result.host).to eq("api.twitter.com") end end end context "with a valid user name" do let(:id) { "RyanTownsend" } describe "#remote_url" do it "should return a valid URL" do result = URI(subject.remote_url) expect(result.host).to eq("api.twitter.com") end end end context "with an invalid identifier" do let(:id) { "$omeInvalidN@me" } describe "#remote_url" do it "should raise an error" do expect { subject.remote_url }.to raise_error(RuntimeError) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems