Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. require 'rspec'
  2. require 'rack/test'
  3. require 'test/unit'
  4.  
  5. ENV['RACK_ENV'] = 'test'
  6.  
  7. require File.expand_path '../../app.rb', __FILE__
  8.  
  9. module RSpecMixin
  10. include Rack::Test::Methods
  11. def app() Sinatra::Application end
  12. end
  13.  
  14.  
  15. ENV['RACK_ENV'] = 'test'
  16.  
  17. RSpec.configure do |config|
  18. config.include RSpecMixin
  19. config.include Rack::Test::Methods
  20. config.filter_run :focus
  21. config.run_all_when_everything_filtered = true
  22. config.disable_monkey_patching!
  23. config.warnings = true
  24. if config.files_to_run.one?
  25. config.default_formatter = 'doc'
  26. end
  27.  
  28. config.profile_examples = 10
  29. config.order = :random
  30. Kernel.srand config.seed
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement