Sha256: 2182e9ee6f5bbdcfe710c4c312cd3e20c938b9bac89e6f35c67335f9525972bc
Contents?: true
Size: 1.62 KB
Versions: 1
Compression:
Stored size: 1.62 KB
Contents
require_relative '../spec_helper' def plist <<-EOS <?xml version="1.0"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>name</key> <string>specification name</string> <key>notificationEmail</key> <string>email@example.com</string> <key>taskSpecifications</key> <dict> <key>task name</key> <dict> <key>arguments</key> <array> <string>hello</string> </array> <key>command</key> <string>/bin/echo</string> <key>dependsOnTasks</key> <array> <string>another task</string> </array> </dict> </dict> </dict> </array> </plist> EOS end describe Girdle::Specification do before do @spec = Girdle::Specification.new( name: 'specification name', notification_email: 'email@example.com', tasks: [ Girdle::Task.new( name: 'task name', command: '/bin/echo', arguments: ['hello'], depends_on: ['another task'] ) ] ) end it 'must have name, notification_email, tasks and depends_on accessors' do @spec.name.must_equal 'specification name' @spec.notification_email.must_equal 'email@example.com' @spec.tasks.size.must_equal 1 end it 'must append tasks' do @spec.tasks.size.must_equal 1 @spec.tasks << Girdle::Task.new @spec.tasks.size.must_equal 2 end it 'must render itself as a plist' do @spec.to_plist.must_equal plist end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
girdle-0.0.5 | spec/girdle/specification_spec.rb |