You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .junie/guidelines.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@ This document captures project-specific knowledge to streamline setup, testing,
12
12
- See .env.local.example for an example of what to put in .env.local.
13
13
- See CONTRIBUTING.md for details on how to set up your local environment.
14
14
- Ruby and Bundler
15
-
- Runtime supports very old Rubies (>= 1.9.2) but development tooling targets >= 2.3 because of CI/setup-ruby and dev dependencies.
15
+
- Runtime supports Ruby >= 2.3.0
16
+
- Development tooling targets Ruby >= 2.3.0 (minimum supported by setup-ruby GHA).
16
17
- Use a recent Ruby (>= 3.4 recommended) for fastest setup and to exercise modern coverage behavior.
17
18
- Install dependencies via Bundler in project root:
18
19
- bundle install
@@ -53,7 +54,7 @@ This document captures project-specific knowledge to streamline setup, testing,
53
54
- RSpec.describe usage:
54
55
- Use `describe "#<method_name>"` to contain a block of specs that test instance method behavior.
55
56
- Use `describe "::<method_name>"` to contain a block of specs that test class method behavior.
56
-
- Do not use `describe ".<method_name>"` because the dot is ambiguous w.r.t instance vs. class methods.
57
+
- Do not use `describe ".<method_name>"` because the dot is ambiguous w.r.t instance vs. class methods.
57
58
- When adding new code or modifying existing code always add tests to cover the updated behavior, including branches, and different types of expected and unexpected inputs.
58
59
- Additional test utilities:
59
60
- rspec-stubbed_env: Use stub_env to control ENV safely within examples.
@@ -89,11 +90,13 @@ This document captures project-specific knowledge to streamline setup, testing,
89
90
- Place new specs under spec/ mirroring lib/ structure where possible. Do not require "spec_helper" at the top of spec files, as it is automatically loaded by .rspec.
90
91
- If your code relies on environment variables that drive activation (see "Activation env vars" below), prefer using rspec-stubbed_env:
91
92
- it does not support stubbing with blocks, but it does automatically clean up after itself.
92
-
-outside the example:
93
+
-the below config is included in all spec scenarios by the kettle-test gem, so no need to do it again; it is here for reference:
- If your spec needs to assert on console output, tag it with :check_output. By default, STDOUT is silenced.
98
101
- Use Timecop for deterministic time-sensitive behavior as needed (require config/timecop is already done by spec_helper).
99
102
@@ -133,6 +136,7 @@ Notes
133
136
- Coverage reports: NEVER review the HTML report. Use JSON (preferred), XML, LCOV, or RCOV. For this project, always run tests with K_SOUP_COV_FORMATTERS set to "json".
134
137
- Do NOT modify .envrc in tasks; when running tests locally or in scripts, manually prefix each run, e.g.: K_SOUP_COV_FORMATTERS="json" bin/rspec
135
138
- For all the kettle-soup-cover options, see .envrc and find the K_SOUP_COV_* env vars.
139
+
- NEVER modify ENV variables in tests directly. Always use the stub_env macro from the rspec-stubbed_env gem (more details in the testing section above).
136
140
137
141
Important documentation rules
138
142
- Do NOT edit files under docs/ manually; they are generated by `bundle exec rake yard` as part of the default rake task.
0 commit comments