Sha256: 0ce67bd526883c6b08f26d6dbb37f99a3f5a88d8a79e2bf8c50a7dd3acf341e5

Contents?: true

Size: 918 Bytes

Versions: 150

Compression:

Stored size: 918 Bytes

Contents

require "spec_helper"

module Beaker
  module Options
    describe PEVersionScraper do
      it "can pull version from local LATEST file" do
        filename = 'LATEST'
        latest = File.open(filename, 'w')
        latest.write('3.7.1-rc0-8-g73f93cb')
        latest.close
        expect(PEVersionScraper.load_pe_version('.', filename)).to be === "3.7.1-rc0-8-g73f93cb"
        File.delete(filename)
      end

      it "can pull version from preview LATEST file" do
        filename = 'LATEST'
        latest = File.open(filename, 'w')
        latest.write('3.8.1')
        latest.close
        expect(PEVersionScraper.load_pe_version('.', filename)).to be === '3.8.1'
        File.delete(filename)
      end

      it "raises error when file doesn't exist" do
        expect{PEVersionScraper.load_pe_version("not a valid path", "not a valid filename")}.to raise_error(ArgumentError)
      end

    end
  end
end

Version data entries

150 entries across 150 versions & 2 rubygems

Version Path
beaker-pe-3.3.1 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.19.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-3.3.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.18.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-3.2.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-3.0.1 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.16.1 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-3.0.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.16.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.15.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.14.1 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.14.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.13.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.12.0 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.11.24 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.11.23 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.11.22 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.11.21 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.11.20 spec/beaker-pe/options/pe_version_scaper_spec.rb
beaker-pe-2.11.19 spec/beaker-pe/options/pe_version_scaper_spec.rb