Sha256: 084c4d80ef2db54e5af9d484eda84728e3f2ce0aac9071715c50c2b84230676b

Contents?: true

Size: 756 Bytes

Versions: 9

Compression:

Stored size: 756 Bytes

Contents

require "non-stupid-digest-assets"

RSpec.describe SharingTags::ActionView::AssetHelper, type: :helper do

  describe "#without_digest_asset_url" do
    before do
      SharingTags.configure do
        image        "http://img.png"
      end
    end

    let(:image) { "image_path/image.png" }

    subject { helper.without_digest_asset_url(image) }

    it "expect exist method" do
      expect(helper).to be_respond_to(:without_digest_asset_url)
    end

    it "expect return non digested url" do
      is_expected.to be_eql("http://test.host/images/image_path/image.png")
    end

    it "add to non digest gem" do
      NonStupidDigestAssets.whitelist = []
      expect { is_expected }.to change(::NonStupidDigestAssets, :whitelist)
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sharing_tags-0.0.18 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.17 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.16 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.15 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.14 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.13 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.12 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.11 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.10 spec/helpers/asset_helper_spec.rb