Sha256: 0086f7724f349ba07ca037ad6df1abf7f067e72de9b51b837b9383c8cf35ee29

Contents?: true

Size: 595 Bytes

Versions: 9

Compression:

Stored size: 595 Bytes

Contents

require "spec_helper"

describe SocialAvatarProxy::Routes do
  subject do
    SocialAvatarProxy::Routes.new(app)
  end

  let(:path_prefix) { "" }
  let(:app) { mock("app", path_prefix: path_prefix) }

  describe "#avatar_base_path" do
    context "without a path_prefix" do
      it "should return empty string" do
        expect(subject.avatar_base_path).to eq("")
      end
    end
    
    context "with a path_prefix" do
      let(:path_prefix) { "/avatars" }
      it "should return the path prefix" do
        expect(subject.avatar_base_path).to eq("/avatars")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
social-avatar-proxy-2.0.1 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-2.0.0 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-1.2.0 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-1.1.0 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-1.0.1 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-1.0.0 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-0.0.9 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-0.0.8 spec/social_avatar_proxy/routes_spec.rb
social-avatar-proxy-0.0.7 spec/social_avatar_proxy/routes_spec.rb