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
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,7 @@ This document captures project-specific knowledge to streamline setup, testing,
47
47
- RSpec 3.13 with custom spec/spec_helper.rb configuration:
48
48
- silent_stream: STDOUT is silenced by default for examples to keep logs clean.
49
49
- To explicitly test console output, tag the example or group with :check_output.
50
-
- Global state hygiene: Around each example, FlossFunding.namespaces and FlossFunding.silenced are snapshotted and restored to prevent cross-test pollution.
51
50
- DEBUG toggle: Set DEBUG=true to require 'debug' and avoid silencing output during your run.
52
-
- ENV seeding: The suite sets ENV["FLOSS_FUNDING_FLOSS_FUNDING"] = "Free-as-in-beer" so that the library’s own namespace is considered activated (avoids noisy warnings).
53
51
- Coverage: kettle-soup-cover integrates SimpleCov; .simplecov is invoked from spec_helper when enabled by Kettle::Soup::Cover::DO_COV, which is controlled by K_SOUP_COV_DO being set to true / false.
54
52
- RSpec.describe usage:
55
53
- Use `describe "#<method_name>"` to contain a block of specs that test instance method behavior.
@@ -73,10 +71,11 @@ This document captures project-specific knowledge to streamline setup, testing,
73
71
- Output visibility
74
72
- To see STDOUT from the code under test, use the :check_output tag on the example or group.
75
73
Example:
76
-
RSpec.describe "output", :check_output do
77
-
it "prints" do
78
-
puts "This output should be visible"
79
-
expect(true).to be true
74
+
RSpec.describe "with output", :check_output do
75
+
it "has output" do
76
+
output = capture(:stderr) {kernel.warn("This is a warning")}
77
+
logs = [ "This is a warning\n" ]
78
+
expect(output).to(include(*logs))
80
79
end
81
80
end
82
81
- Alternatively, run with DEBUG=true to disable silencing for the entire run.
0 commit comments