Sha256: 15bfb504cea041b0ac373cc7360491a39737a1f2b99d25ec2bfd617037c68c44

Contents?: true

Size: 921 Bytes

Versions: 18

Compression:

Stored size: 921 Bytes

Contents

#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/pops'

describe "Puppet::Pops::Issues" do
  include Puppet::Pops::Issues

  it "should have an issue called NAME_WITH_HYPHEN" do
    x = Puppet::Pops::Issues::NAME_WITH_HYPHEN
    x.class.should == Puppet::Pops::Issues::Issue
    x.issue_code.should == :NAME_WITH_HYPHEN
  end

  it "should should format a message that requires an argument" do
    x = Puppet::Pops::Issues::NAME_WITH_HYPHEN
    x.format(:name => 'Boo-Hoo',
      :label => Puppet::Pops::Model::ModelLabelProvider.new,
      :semantic => "dummy"
      ).should == "A String may not have a name containing a hyphen. The name 'Boo-Hoo' is not legal"
  end

  it "should should format a message that does not require an argument" do
    x = Puppet::Pops::Issues::NOT_TOP_LEVEL
    x.format().should == "Classes, definitions, and nodes may only appear at toplevel or inside other classes"
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
puppet-3.6.2 spec/unit/pops/issues_spec.rb
puppet-3.6.2-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.6.1 spec/unit/pops/issues_spec.rb
puppet-3.6.1-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.6.0 spec/unit/pops/issues_spec.rb
puppet-3.6.0-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.6.0.rc1 spec/unit/pops/issues_spec.rb
puppet-3.6.0.rc1-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.5.1 spec/unit/pops/issues_spec.rb
puppet-3.5.1-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.5.1.rc1 spec/unit/pops/issues_spec.rb
puppet-3.5.1.rc1-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.5.0.rc3 spec/unit/pops/issues_spec.rb
puppet-3.5.0.rc3-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.5.0.rc2 spec/unit/pops/issues_spec.rb
puppet-3.5.0.rc2-x86-mingw32 spec/unit/pops/issues_spec.rb
puppet-3.5.0.rc1 spec/unit/pops/issues_spec.rb
puppet-3.5.0.rc1-x86-mingw32 spec/unit/pops/issues_spec.rb