Sha256: 4768359cfc5ed7740a5774d90aad94c052721020d36e40285394cc6a195526d7

Contents?: true

Size: 507 Bytes

Versions: 15

Compression:

Stored size: 507 Bytes

Contents

require_relative "../helpers/sandbox"

# Checks if a migration is properly copied to sandbox subfolder
RSpec::Matchers.define :have_copy_in_sandbox do |folder|
  match do |source|

    basename = File.basename(source, ".rb")[14..-1]
    sample   = "*#{ basename }.uuids.rb"
    search   = File.join(sandbox, folder, sample)
    file     = Dir[search].first

    # Check whether file exists and has required content.
    expect(file).not_to be_nil
    expect(File.read file).to eq File.read source
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
uuids-5.0.0 spec/support/development/matchers/migrations.rb
uuids-4.1.8 spec/support/development/matchers/migrations.rb
uuids-4.1.7 spec/support/development/matchers/migrations.rb
uuids-4.1.6 spec/support/development/matchers/migrations.rb
uuids-4.1.5 spec/support/development/matchers/migrations.rb
uuids-4.1.4 spec/support/development/matchers/migrations.rb
uuids-4.1.3 spec/support/development/matchers/migrations.rb
uuids-4.1.2 spec/support/development/matchers/migrations.rb
uuids-4.1.1 spec/support/development/matchers/migrations.rb
uuids-4.1.0 spec/support/development/matchers/migrations.rb
uuids-4.0.1 spec/support/development/matchers/migrations.rb
uuids-4.0.0 spec/support/development/matchers/migrations.rb
uuids-3.0.0 spec/support/development/matchers/migrations.rb
uuids-2.0.0 spec/support/development/matchers/migrations.rb
uuids-1.4.2 spec/support/development/matchers/migrations.rb