Microservice to handle the Contact form on placebazaar.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_helper.rb 604B

12345678910111213141516171819202122232425262728293031
  1. require 'minitest/autorun'
  2. require 'minitest/assert_changes'
  3. require 'byebug'
  4. # Set up fake ENV vars
  5. ENV['MAIL_TO'] = 'webmaster@example.com'
  6. require 'contact'
  7. require 'awesome_print'
  8. require 'ostruct'
  9. ENV['RACK_ENV'] = 'test'
  10. Sinatra::Application.environment = :test
  11. ## Include all support files
  12. Dir[File.join(__dir__, 'support', '**', '*.rb')].each { |file| require file }
  13. module Minitest
  14. class Spec
  15. include FileHelpers
  16. include RequestHelpers
  17. include TimeHelpers
  18. before do
  19. Pony.override_options = { via: :test }
  20. Mail::TestMailer.deliveries.clear
  21. end
  22. end
  23. end