Skip to content

Commit a3f1d4c

Browse files
committed
Fix JavaMemoryAssistant spec missing test helper
Add missing sub_configuration_context helper method to java_memory_assistant_spec.rb. This test has been broken since it was originally added in commit f2eee85 (Oct 26, 2016). The test references sub_configuration_context() on line 59 but never defined the helper method. Other specs (tomcat_spec.rb, open_jdk_like_spec.rb, ibm_jre_spec.rb) each define their own local helper following the same pattern. This is a pre-existing bug unrelated to the Ruby 3.4 migration - the test would have failed on any Ruby version (2.5, 2.6, 2.7, 3.0, 3.1, 3.4) with NoMethodError for undefined method 'sub_configuration_context'. Fixes #436 (original PR where test was introduced)
1 parent c269b5f commit a3f1d4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/java_buildpack/framework/java_memory_assistant_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,9 @@ class StubJavaMemoryAssistant < JavaBuildpack::Framework::JavaMemoryAssistant
7373
public :command, :sub_components, :supports?
7474

7575
end
76+
77+
def sub_configuration_context(configuration)
78+
c = context.clone
79+
c[:configuration] = configuration
80+
c
81+
end

0 commit comments

Comments
 (0)