Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 3.71 KB

File metadata and controls

67 lines (41 loc) · 3.71 KB

Public definition for rails_test_factory.

rails_test_factory.new_system_test

load("@rules_ruby//rails:rails_test_factory.bzl", "rails_test_factory")

rails_test_factory.new_system_test(test_package, application_system_test_case, default_includes,
                                   default_size, tags)

Create a rails_system_test macro for a Rails application.

PARAMETERS

Name Description Default Value
test_package Optional. The name of the package that contains the test helpers. For example, if the Rails app is rooted in the foo directory, the test package is typically foo/test. None
application_system_test_case Optional. The label for the Rails application's application_system_test_case.rb. None
default_includes Optional. A list of Ruby includes that should be part of the Ruby test invocation. None
default_size Optional. The default test size for the tests created with the resulting macro. "large"
tags Optional. A list of tags that are added to the test declaration. ["no-sandbox"]

RETURNS

A Bazel macro function that defines Rails system test targets using the provided attributes.

rails_test_factory.new_test

load("@rules_ruby//rails:rails_test_factory.bzl", "rails_test_factory")

rails_test_factory.new_test(test_package, test_helper, default_includes, default_size, tags)

Create a rails_test macro for a Rails application.

The resulting macro encapsulates the application-specific attributes for the resulting test target.

PARAMETERS

Name Description Default Value
test_package Optional. The name of the package that contains the test helpers. For example, if the Rails app is rooted in the foo directory, the test package is typically foo/test. None
test_helper The label for the Rails application's test_helper.rb. None
default_includes Optional. A list of Ruby includes that should be part of the Ruby test invocation. None
default_size Optional. The default test size for the tests created with the resulting macro. "small"
tags Optional. A list of tags that are added to the test declaration. []

RETURNS

A Bazel macro function that defines Rails test targets using the provided attributes.