Sha256: 942dc6ff9eeea741cd7f4c3af0804356cc2c5689d5952983f03fa49ebe44f7d7

Contents?: true

Size: 794 Bytes

Versions: 28

Compression:

Stored size: 794 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../../test_helper"

include_fixture_resources

class CronResourceTest < Test::Unit::TestCase
  context "Base" do
    setup do
      PoolParty::Resource.define_resource_methods
      @res = PoolParty::Resources::Cron.new "run root scripts", :command => "/bin/sh /usr/bin/root_scripts", :hour => [2,8,14], :weekday => [2,5]
      @base = DependencyResolvers::Chef
      @base.compile_directory = test_dir
    end
    
    should "have the cron method denoted by has_method_name" do
      str = "cron \"run root scripts\" do
  command \"/bin/sh /usr/bin/root_scripts\"
  action :create
  minute \"*\"
  hour [ 2, 8, 14 ]
  day \"*\"
  month \"*\"
  weekday [ 2, 5 ]
  user \"root\"
end\n"

      assert_equal str, @base.compile(@res)
    end
    
  end
  
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.1 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.10 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.11 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.12 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.13 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.14 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.15 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.16 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.17 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.2 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.3 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.4 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.5 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.6 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.7 test/lib/poolparty/resources/cron_test.rb
auser-poolparty-1.3.8 test/lib/poolparty/resources/cron_test.rb
fairchild-poolparty-1.3.17 test/lib/poolparty/resources/cron_test.rb
fairchild-poolparty-1.3.5 test/lib/poolparty/resources/cron_test.rb
poolparty-1.3.15 test/lib/poolparty/resources/cron_test.rb