Sha256: cc3009f833a646415fe9c83bea84ca31f5e2f57ac54b11166b8a973f494365ff
Contents?: true
Size: 640 Bytes
Versions: 2
Compression:
Stored size: 640 Bytes
Contents
require 'test_helper' class TasksTest < ActiveSupport::TestCase setup do load File.expand_path('../../lib/tasks/cronjobs.rake', __FILE__) Rake::Task.define_task :environment end teardown do FileUtils.rm_rf Rails.root.join('tmp') end test 'check' do Cronjobs.expects(:write).once Rake::Task['cronjobs:check'].invoke digest = Digest::MD5.file(Rails.root.join('config/cronjobs.rb')) digest_path = Rails.root.join('tmp/digests/cronjobs') FileUtils.mkdir_p digest_path.dirname File.write digest_path, digest Cronjobs.expects(:write).never Rake::Task['cronjobs:check'].invoke end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cronjobs-0.1.0 | test/tasks_test.rb |
cronjobs-0.0.1 | test/tasks_test.rb |