Sha256: 57d1ea0bd928082ab1c412b0175bd0e6d2294748e8455ce7caade3f05627bbce

Contents?: true

Size: 1.16 KB

Versions: 2

Compression:

Stored size: 1.16 KB

Contents

$:.unshift File.join(File.dirname(__FILE__), "..", "..", "lib")

require 'spec'
require 'buildmaster'
require 'buildmaster/cotta'
require 'buildmaster/cotta/in_memory_system'

module BuildMaster

context 'JavaManifestTest' do
  setup do
    @cotta = Cotta.new(InMemorySystem.new)
  end
  
  teardown do
    @cotta = nil
  end

  specify 'loading_manifest' do
    file = @cotta.file('dir/manifest.mf')
    file.save(<<CONTENT
Implementation-Version: 2.3.3
Implementation-Build: 1139

Implementation-Vendor: Vendor
Implementation-Number: Number
CONTENT
)
    manifest = JavaManifest.new(file)
    version = manifest.version
    "2.3.3".should_equal version.number
  end
  
  specify 'increase_build' do
    file = @cotta.file('dir/manifest.mf')
    file.save(<<CONTENT
Implementation-Version: 2.3.3
Implementation-Build: 1139

Implementation-Vendor: Vendor
Implementation-Number: Number
CONTENT
)    
    manifest = JavaManifest.new(file)
    build_number = manifest.version.build
    version = manifest.increase_build
    (build_number + 1).should_equal version.build
    manifest.version.build.should_equal version.build
  end
end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
BuildMaster-0.9.0 test/buildmaster/tc_java_manifest.rb
BuildMaster-0.9.1 test/buildmaster/tc_java_manifest.rb