Skip to content

Commit

Permalink
Add tests for symbol conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jun 7, 2024
1 parent 6503541 commit 87657d6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/facter_db_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,19 @@

context 'without parameters' do
include_examples 'returns a result'
it 'returns symbols as keys in factsets' do
result.each do |factset|
expect(factset.keys).to all(be_an_instance_of(Symbol))
end
end
end

Check failure on line 333 in spec/facter_db_spec.rb

View workflow job for this annotation

GitHub Actions / rubocop

RSpec/EmptyLineAfterExampleGroup: Add an empty line after `context`. (https://rspec.rubystyle.guide/#empty-lines-between-describes, https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup)
context 'with stringified output' do
let(:symbolize_keys) {false}

Check failure on line 335 in spec/facter_db_spec.rb

View workflow job for this annotation

GitHub Actions / rubocop

RSpec/EmptyLineAfterFinalLet: Add an empty line after the last `let`. (https://rspec.rubystyle.guide/#empty-line-after-let, https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet)

Check failure on line 335 in spec/facter_db_spec.rb

View workflow job for this annotation

GitHub Actions / rubocop

Layout/SpaceInsideBlockBraces: Space missing inside {.

Check failure on line 335 in spec/facter_db_spec.rb

View workflow job for this annotation

GitHub Actions / rubocop

Layout/SpaceInsideBlockBraces: Space missing inside }.
it 'returns strings as keys in factsets' do
result.each do |factset|
expect(factset.keys).to all(be_an_instance_of(String))
end
end
end

context 'with an Array filter' do
Expand Down

0 comments on commit 87657d6

Please sign in to comment.