aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-09-18 16:07:06 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-09-18 16:07:06 -0700
commit4a9b45ce2214573de29eed694e4416d46642244f (patch)
tree59e5627535773b8d0d15ae1867429871fe5df0b3 /lib/tasks
parent65a6d525c6ce36acefd4b1918bbc5f14132e7810 (diff)
downloadrails-4a9b45ce2214573de29eed694e4416d46642244f.tar.gz
rails-4a9b45ce2214573de29eed694e4416d46642244f.tar.bz2
rails-4a9b45ce2214573de29eed694e4416d46642244f.zip
Use a test helper to create fixtures rather than rely on them being predefined
Too much hassle to manage all the steps compared to just pointing to an .eml fixture and having it setup for you.
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/action_mailroom.rake17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/tasks/action_mailroom.rake b/lib/tasks/action_mailroom.rake
index ce80fcf55e..2cf692cc0f 100644
--- a/lib/tasks/action_mailroom.rake
+++ b/lib/tasks/action_mailroom.rake
@@ -4,8 +4,8 @@ namespace :action_mailroom do
# Prevent migration installation task from showing up twice.
Rake::Task["install:migrations"].clear_comments
- desc "Copy over the migration and fixtures"
- task install: %w( environment active_storage:install copy_migration copy_fixtures )
+ desc "Copy over the migration"
+ task install: %w( environment active_storage:install copy_migration )
task :copy_migration do
if Rake::Task.task_defined?("action_mailroom:install:migrations")
@@ -14,17 +14,4 @@ namespace :action_mailroom do
Rake::Task["app:action_mailroom:install:migrations"].invoke
end
end
-
- FIXTURE_TEMPLATE_PATH = File.expand_path("../templates/fixtures.yml", __dir__)
- FIXTURE_APP_DIR_PATH = Rails.root.join("test/fixtures/action_mailroom")
- FIXTURE_APP_PATH = FIXTURE_APP_DIR_PATH.join("inbound_emails.yml")
-
- task :copy_fixtures do
- if File.exist?(FIXTURE_APP_PATH)
- puts "Won't copy Action Mailbox fixtures as it already exists"
- else
- FileUtils.mkdir FIXTURE_APP_DIR_PATH
- FileUtils.cp FIXTURE_TEMPLATE_PATH, FIXTURE_APP_PATH
- end
- end
end