Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
version_gem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
oauth-xx
version_gem
Commits
06832d2c
Unverified
Commit
06832d2c
authored
2 years ago
by
Peter Boling
Browse files
Options
Downloads
Patches
Plain Diff
Tests should pass on any version of Ruby
parent
9564dbda
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/version_gem/ruby_spec.rb
+12
-1
12 additions, 1 deletion
spec/version_gem/ruby_spec.rb
with
12 additions
and
1 deletion
spec/version_gem/ruby_spec.rb
+
12
−
1
View file @
06832d2c
...
...
@@ -11,17 +11,28 @@ RSpec.describe VersionGem::Ruby do
let
(
:engine
)
{
'ruby'
}
describe
'#gte_minimum_version?'
do
let
(
:version
)
{
'2.7.7'
}
let
(
:version
)
{
::
RUBY_VERSION
}
subject
(
:gte_minimum_version
)
{
described_class
.
gte_minimum_version?
(
version
,
engine
)
}
it
'returns true when current ruby greater than minimum'
do
expect
(
gte_minimum_version
).
to
eq
(
true
)
end
context
'when not gte minimum'
do
let
(
:version
)
{
'99.0.0'
}
it
'returns false when current ruby not greater than minimum'
do
expect
(
gte_minimum_version
).
to
eq
(
false
)
end
end
end
describe
'#actual_minor_version?'
do
let
(
:major
)
{
'1'
}
let
(
:minor
)
{
'8'
}
subject
(
:actual_minor_version
)
{
described_class
.
actual_minor_version?
(
major
,
minor
,
engine
)
}
it
'returns false when actual ruby not same'
do
expect
(
actual_minor_version
).
to
eq
(
false
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment