Sha256: bf686ad7b08ca7d5d66f4140aa89488cc07902e51a96a0f5d24ece4116aac357

Contents?: true

Size: 500 Bytes

Versions: 6

Compression:

Stored size: 500 Bytes

Contents

require 'bundler/setup'
require 'asset_symlink'

RSpec.configure do |config|
  config.mock_with :rspec
end

RSpec::Matchers.define :be_a_symlink_to do |y|
  match do |x|
    @symlink_location = File.symlink?(x) && File.readlink(x)

    @symlink_location == y
  end

  failure_message_for_should do |x|
    if !@symlink_location
      "expected #{x} to be a symlink but it was not"
    else 
      "expected #{x} to be a symlink to #{y} but it was a symlink to #{@symlink_location}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asset_symlink-0.3.2 spec/spec_helper.rb
asset_symlink-0.3.1 spec/spec_helper.rb
asset_symlink-0.3.0 spec/spec_helper.rb
asset_symlink-0.2.1 spec/spec_helper.rb
asset_symlink-0.2.0 spec/spec_helper.rb
asset_symlink-0.1.0 spec/spec_helper.rb