Sha256: f8fb14e97b2dc2cd8ef9b23443652b68254d80879cc5e8580a0b4f701c66e6dc
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 Bytes
Contents
require 'test_helper' class TaskTest < 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 'update' do Cronjobs.expects(:update).once Rake::Task['cronjobs:update'].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(:update).never Rake::Task['cronjobs:update'].invoke end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cronjobs-4.0.0.1 | test/task_test.rb |
cronjobs-4.0.0.0 | test/task_test.rb |