Sha256: 18c9d37c8274339c427d5932a5c4fe412b081a2e26464a2b945aea5af76878fc

Contents?: true

Size: 798 Bytes

Versions: 8

Compression:

Stored size: 798 Bytes

Contents

require "spec_helper"
require "social_avatar_proxy/engine"

describe SocialAvatarProxy::Engine do
  subject do
    SocialAvatarProxy::Engine
  end

  describe "#mounted_at" do
    it "should match what is in the routes file" do
      expect(subject.mounted_at).to eq("avatars/test")
    end
  end
  
  describe "routing" do
    subject do
      ActionController::Base.new
    end

    it "should define #twitter_avatar_path on ApplicationController" do
      path = subject.twitter_avatar_path("ryantownsend")
      expect(path).to eq "/avatars/test/twitter/ryantownsend"
    end
    
    it "should define #facebook_avatar_path on ApplicationController" do
      path = subject.facebook_avatar_path("ryandtownsend")
      expect(path).to eq "/avatars/test/facebook/ryandtownsend"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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