File: ruby-all-dev

package info (click to toggle)
ruby-defaults 1%3A2.5.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 128 kB
  • sloc: sh: 83; ruby: 77; makefile: 24
file content (30 lines) | stat: -rwxr-xr-x 809 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/ruby

ARGV.push('-v')
require 'ruby_debian_dev'
require "minitest/autorun"

describe RubyDebianDev do
  RubyDebianDev::RUBY_INTERPRETERS.each do |ruby, data|
    it "installs #{data[:binary]}" do
      File.executable?(data[:binary]).must_equal true
    end

    it "has an associated minimum version of #{ruby}" do
      v = RubyDebianDev.min_ruby_dependency_for("lib#{ruby}")
      v.must_match %r{^ruby \(>= .+\)$}
    end
  end

  it 'provides a Ruby upper bound' do
    ruby_upper_bound = RubyDebianDev.ruby_upper_bound
    ruby_upper_bound.must_match %r{^ruby \(<< .+\)}
  end

  it 'provides list of supported interpreters with default first' do
    default = File.basename(File.readlink('/usr/bin/ruby'))
    default.must_equal RubyDebianDev::SUPPORTED_RUBY_VERSIONS.keys.first
  end

end