Sha256: 9290d3168812b70fc649d276e17f5a426f62ee1d25e8598d0eb3de9755f7eb96

Contents?: true

Size: 738 Bytes

Versions: 91

Compression:

Stored size: 738 Bytes

Contents

require 'spec_helper'
require 'puppet/module_tool'

describe Puppet::ModuleTool::Applications::Application do
  describe 'app' do

    good_versions = %w{ 1.2.4 0.0.1 0.0.0 0.0.2-git-8-g3d316d1 0.0.3-b1 10.100.10000
                         0.1.2-rc1 0.1.2-dev-1 0.1.2-svn12345 0.1.2-3 }
    bad_versions = %w{ 0.1 0 0.1.2.3 dev 0.1.2beta }

    let :app do Class.new(described_class).new end

    good_versions.each do |ver|
      it "should accept version string #{ver}" do
        app.parse_filename("puppetlabs-ntp-#{ver}")
      end
    end

    bad_versions.each do |ver|
      it "should not accept version string #{ver}" do
        expect { app.parse_filename("puppetlabs-ntp-#{ver}") }.to raise_error
      end
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
puppet-3.8.7 spec/unit/module_tool/application_spec.rb
puppet-3.8.7-x86-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.7-x64-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.6 spec/unit/module_tool/application_spec.rb
puppet-3.8.6-x86-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.6-x64-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.5 spec/unit/module_tool/application_spec.rb
puppet-3.8.5-x86-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.5-x64-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.4 spec/unit/module_tool/application_spec.rb
puppet-3.8.4-x86-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.4-x64-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.3 spec/unit/module_tool/application_spec.rb
puppet-3.8.3-x86-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.3-x64-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.2 spec/unit/module_tool/application_spec.rb
puppet-3.8.2-x86-mingw32 spec/unit/module_tool/application_spec.rb
puppet-3.8.2-x64-mingw32 spec/unit/module_tool/application_spec.rb
puppet-4.2.0 spec/unit/module_tool/application_spec.rb
puppet-4.2.0-x86-mingw32 spec/unit/module_tool/application_spec.rb