Sha256: 9d444b7da7d04d8a30cd9732d36972272db449cf72279b6245f6d16498fd723a

Contents?: true

Size: 630 Bytes

Versions: 11

Compression:

Stored size: 630 Bytes

Contents

class MockUrlGeneratorBuilder
  def initializer
  end

  def new(attachment)
    @attachment = attachment
    @attachment_options = @attachment.options
    self
  end

  def for(style_name, options)
    @generated_url_with_style_name = style_name
    @generated_url_with_options = options
    "hello"
  end

  def has_generated_url_with_options?(options)
    # options.is_a_subhash_of(@generated_url_with_options)
    options.inject(true) do |acc,(k,v)|
      acc && @generated_url_with_options[k] == v
    end
  end

  def has_generated_url_with_style_name?(style_name)
    @generated_url_with_style_name == style_name
  end
end

Version data entries

11 entries across 11 versions & 5 rubygems

Version Path
jd-paperclip-azure-3.0.0 spec/support/mock_url_generator_builder.rb
kt-paperclip-5.4.0 spec/support/mock_url_generator_builder.rb
paperclip-6.1.0 spec/support/mock_url_generator_builder.rb
paperclip-6.0.0 spec/support/mock_url_generator_builder.rb
paperclip-5.3.0 spec/support/mock_url_generator_builder.rb
paperclip-5.2.1 spec/support/mock_url_generator_builder.rb
paperclip-5.2.0 spec/support/mock_url_generator_builder.rb
paperclip-azure-1.0.2 spec/support/mock_url_generator_builder.rb
paperclip-azure-1.0.1 spec/support/mock_url_generator_builder.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paperclip-5.1.0/spec/support/mock_url_generator_builder.rb
paperclip-5.1.0 spec/support/mock_url_generator_builder.rb