debian-mirror-gitlab/spec/tasks/gitlab/mail_google_schema_whitelisting.rb

28 lines
767 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
require 'spec_helper'
require 'rake'
describe 'gitlab:mail_google_schema_whitelisting rake task' do
before :all do
2017-08-17 22:00:37 +05:30
Rake.application.rake_require "tasks/gitlab/helpers"
2015-04-26 12:48:37 +05:30
Rake.application.rake_require "tasks/gitlab/mail_google_schema_whitelisting"
# empty task as env is already loaded
Rake::Task.define_task :environment
end
describe 'call' do
before do
# avoid writing task output to spec progress
allow($stdout).to receive :write
end
let :run_rake_task do
Rake::Task["gitlab:mail_google_schema_whitelisting"].reenable
Rake.application.invoke_task "gitlab:mail_google_schema_whitelisting"
end
2017-08-17 22:00:37 +05:30
it 'runs the task without errors' do
2015-09-11 14:41:01 +05:30
expect { run_rake_task }.not_to raise_error
2015-04-26 12:48:37 +05:30
end
end
end