-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_helper.rb
39 lines (31 loc) · 1015 Bytes
/
test_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ENV["RAILS_ENV"] ||= "test"
require_relative "../config/environment"
require "rails/test_help"
require "minitest/mock"
require "webmock"
require "httpx/adapters/webmock"
require "webmock/minitest"
WebMock.disable_net_connect!(
allow_localhost: true
)
Dir[File.expand_path("support/**/*.rb", __dir__)].each { |f| require f }
module ActiveSupport
class TestCase
include MockObjects
include Webmocks
# Run tests in parallel with specified workers
parallelize(workers: :number_of_processors)
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
self.fixture_paths << FaspBase::Engine.root.join("test/fixtures")
fixtures :all
# Add more helper methods to be used by all tests here...
end
end
module ActionDispatch
class IntegrationTest < ActiveSupport::TestCase
include FaspBase::IntegrationTestHelper
def sign_in
post fasp_base.session_path, params: { email: "fediadmin@example.com", password: "super_secret" }
end
end
end