Sha256: 31c5b41e75a1500a32e49e03f9c84ef0777dca5804af05cd3df152a1d9e8cfae

Contents?: true

Size: 339 Bytes

Versions: 10

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

10 entries across 10 versions & 2 rubygems

Version Path
sprockets-sass-0.7.0 spec/support/be_fresh_matcher.rb
sprockets-sass-0.6.1 spec/support/be_fresh_matcher.rb
machined-0.7.1 spec/support/be_fresh_matcher.rb
machined-0.7.0 spec/support/be_fresh_matcher.rb
machined-0.6.0 spec/support/be_fresh_matcher.rb
sprockets-sass-0.6.0 spec/support/be_fresh_matcher.rb
sprockets-sass-0.5.1 spec/support/be_fresh_matcher.rb
machined-0.5.0 spec/support/be_fresh_matcher.rb
sprockets-sass-0.5.0 spec/support/be_fresh_matcher.rb
sprockets-sass-0.4.3 spec/support/be_fresh_matcher.rb