Sha256: ffc55027e5b4ab126fb8b66afd600103e2170eae6a7193f7dc7106922e5fccdf

Contents?: true

Size: 681 Bytes

Versions: 9

Compression:

Stored size: 681 Bytes

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../../spec_helper'

require 'puppet/transaction/event'

describe Puppet::Transaction::Event do
    Event = Puppet::Transaction::Event

    it "should require a name and a source" do
        lambda { Event.new }.should raise_error(ArgumentError)
    end

    it "should have a name getter" do
        Event.new(:foo, "bar").name.should == :foo
    end

    it "should have a source accessor" do
        Event.new(:foo, "bar").source.should == "bar"
    end

    it "should be able to produce a string containing the event name and the source" do
        Event.new(:event, :source).to_s.should == "source -> event"
    end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
puppet-0.25.5 spec/unit/transaction/event.rb
puppet-0.25.4 spec/unit/transaction/event.rb
puppet-0.25.3 spec/unit/transaction/event.rb
puppet-0.24.9 spec/unit/transaction/event.rb
puppet-0.25.2 spec/unit/transaction/event.rb
puppet-0.25.1 spec/unit/transaction/event.rb
puppet-0.25.0 spec/unit/transaction/event.rb
puppet-0.24.7 spec/unit/transaction/event.rb
puppet-0.24.8 spec/unit/transaction/event.rb