Sha256: b5b4ae8fef7a11bd2ef32507291aea39dba60391dbb9062f7efd110bd247df33

Contents?: true

Size: 335 Bytes

Versions: 4

Compression:

Stored size: 335 Bytes

Contents

RSpec::Matchers.define :be_fresh do |env|
  match do |actual|
    if actual.method(:fresh?).arity == 1
      actual.fresh?(env)
    else
      actual.fresh?
    end
  end

  failure_message_for_should do |env|
    'expected asset to be fresh'
  end

  failure_message_for_should_not do |env|
    'expected asset to be stale'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
machined-1.1.0 spec/support/be_fresh_matcher.rb
machined-1.0.3 spec/support/be_fresh_matcher.rb
machined-1.0.2 spec/support/be_fresh_matcher.rb
machined-1.0.1 spec/support/be_fresh_matcher.rb