Sha256: b8722fe7c6b84be6dca6a2c30ab018ce4463004fa16b9c184141f4d2beb6feb0

Contents?: true

Size: 339 Bytes

Versions: 22

Compression:

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

22 entries across 22 versions & 4 rubygems

Version Path
machined-0.8.0 spec/support/be_fresh_matcher.rb
sprockets-sass-0.8.0 spec/support/be_fresh_matcher.rb