spec_helper.rb 1012 B

1234567891011121314151617181920212223242526272829
  1. # This file was generated by the `rspec --init` command. Conventionally, all
  2. # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
  3. # Require this file using `require "spec_helper"` to ensure that it is only
  4. # loaded once.
  5. #
  6. # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
  7. ENV["RAILS_ENV"] = "test"
  8. require File.expand_path("../dummy/config/environment.rb", __FILE__)
  9. require "rspec/rails"
  10. # require 'capybara/rails'
  11. require 'capybara/rspec'
  12. require 'capybara/poltergeist'
  13. Capybara.javascript_driver = :poltergeist
  14. puts "Rails: #{Rails.version}"
  15. RSpec.configure do |config|
  16. config.treat_symbols_as_metadata_keys_with_true_values = true
  17. config.run_all_when_everything_filtered = true
  18. config.filter_run :focus
  19. # Run specs in random order to surface order dependencies. If you find an
  20. # order dependency and want to debug it, you can fix the order by providing
  21. # the seed, which is printed after each run.
  22. # --seed 1234
  23. config.order = 'random'
  24. end