Sha256: 2cc580171da472546dbc963ba3ca3836f9957a92223a79fccfd0c74ff317721f

Contents?: true

Size: 757 Bytes

Versions: 2

Compression:

Stored size: 757 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

2 entries across 2 versions & 1 rubygems

Version Path
sharing_tags-0.0.9 spec/helpers/asset_helper_spec.rb
sharing_tags-0.0.8 spec/helpers/asset_helper_spec.rb