summaryrefslogblamecommitdiffstats
path: root/spec/spec_helper.rb
blob: ad8ead8488bb210f0ecdf00c777c1d2bb87ecbc0 (plain) (tree)
1
2
3
4
5
6
7
8

                        
                                  
                                       
                        
 

                            




                                                         

   


                                                                     

                              
ENV['RACK_ENV'] = 'test'

require_relative '../registration'
require_relative 'support/band_factory'
require 'capybara/rspec'

RSpec.configure do |config|
  config.include BandFactory
  config.before(:example) do
    @doc_spy = spy("Prawn::Document")
    allow(Prawn::Document).to receive('new') { @doc_spy }
    allow(@doc_spy).to receive('render_file')
  end
end

Mail.defaults do
  delivery_method :test # in practice you'd do this in spec_helper.rb
end

Capybara.app = RegistrationApp