Sha256: 050cc2a3673fdf18213108871444b4368109cda7d7677459b450fae586666811
Contents?: true
Size: 850 Bytes
Versions: 4
Compression:
Stored size: 850 Bytes
Contents
require 'jbundler/classpath_file' require 'jbundler/mavenfile' require 'jbundler/gemfile_lock' describe JBundler::Mavenfile do let(:workdir) { 'target' } let(:mfile) { File.join(workdir, 'tmp-mvnfile') } let(:mfile_lock) { mfile + ".lock"} subject { JBundler::Mavenfile.new(mfile) } before do Dir[File.join(workdir, "tmp*")].each { |f| FileUtils.rm_f f } end it 'generates lockfile' do subject.generate_lockfile(%w( a b c d e f)) File.read(mfile_lock).must_equal <<-EOF a b c d e f EOF end it 'check locked coordinate' do File.open(mfile_lock, 'w') do |f| f.write <<-EOF a:b:3 a:c:1 EOF end subject.load_lockfile.must_equal ["a:b:3", "a:c:1"] subject.locked.must_equal ["a:b:3", "a:c:1"] subject.locked?("a:b:321").must_equal true subject.locked?("a:d:432").must_equal false end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
jbundler-0.3.0 | spec/pom_spec.rb~ |
jbundler-0.2.2 | spec/pom_spec.rb~ |
jbundler-0.2.1 | spec/pom_spec.rb~ |
jbundler-0.2.0 | spec/pom_spec.rb~ |