Skip to content

Commit 047dbd7

Browse files
committed
Update smoke_helper.rb
1 parent 03e4690 commit 047dbd7

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/support/smoke_helper.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ def macos?
150150
end
151151

152152
def expected_version
153+
version_constant = load_version_constant
154+
return version_constant if version_constant
155+
153156
version_path = File.join(ROOT, "VERSION")
154157
version_md_path = File.join(ROOT, "VERSION.md")
155158

@@ -171,5 +174,16 @@ def expected_version
171174
rescue StandardError
172175
"1.0.0"
173176
end
177+
178+
def load_version_constant
179+
require File.join(ROOT, "lib", "asrfacet_rb", "version")
180+
version = ASRFacet::VERSION if defined?(ASRFacet::VERSION)
181+
version = version.to_s.strip
182+
return version unless version.empty?
183+
184+
nil
185+
rescue StandardError
186+
nil
187+
end
174188
end
175189
end

0 commit comments

Comments
 (0)