-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: 8.2.1 regression tests #1265
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
askonev
changed the title
feature: 8.2.1 fixes & features
feature: 8.2.1 regression tests
Nov 13, 2024
askonev
force-pushed
the
feature/8.2.1
branch
from
November 13, 2024 16:57
f33993b
to
f0e796e
Compare
hash with a type other than string will return describe 'Custom Matchers' do
let(:example_hash) do
{
string: 'Hello World', # String
integer: 42, # Integer
float: 3.14, # Float
boolean: true, # Boolean (true)
boolean_false: false, # Boolean (false)
symbol: :ruby, # Symbol
array: [1, 2, 3], # Array
nested_hash: { a: 1, b: 2 }, # Hash
date: Date.new(2024, 1, 1), # Date object
time: Time.now, # Time object
regexp: /\d+/, # Regular Expression
range: (1..5), # Range
proc: -> { puts 'Hello' }, # Proc/Lambda
set: Set.new([1, 2, 3]), # Set
class_name: String, # Class
multiline_string: <<~HEREDOC # Heredoc (multiline string)
This is a
multiline string
HEREDOC
}
end
it 'hash_have_no_empty_string_values' do
expect(example_hash).to hash_have_no_empty_string_values
end
end expected hash to have only non-empty string values, but ["found non-string values: integer: Integer, float: Float, boolean: TrueClass, boolean_false: FalseClass, symbol: Symbol, array: Array, nested_hash: Hash, date: Date, time: Time, regexp: Regexp, range: Range, proc: Proc, set: Set, class_name: Class"]
0) Custom Matchers hash_have_no_empty_string_values
Failure/Error: expect(example_hash).to hash_have_no_empty_string_values
expected hash to have only non-empty string values, but ["found non-string values: integer: Integer, float: Float, boolean: TrueClass, boolean_false: FalseClass, symbol: Symbol, array: Array, nested_hash: Hash, date: Date, time: Time, regexp: Regexp, range: Range, proc: Proc, set: Set, class_name: Class"]
# ./project_spec/unit/custom_matchers_spec.rb:31:in `block (2 levels) in <top (required)>'
|
lemonowl
approved these changes
Nov 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.