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
|