blob: 9fd71aae1d16ead2796301659a108e353ee83fb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/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
|