Skip to content
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

Fix missing constant OpenStruct in tests #131

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

agrare
Copy link
Member

@agrare agrare commented Apr 29, 2024

Fixes

Failures:

  1) InventoryRefresh::Graph#to_graphviz prints the graph
     Failure/Error: let(:node1) { OpenStruct.new(:whatever => 'foo') }
     
     NameError:
       uninitialized constant OpenStruct
     
         let(:node1) { OpenStruct.new(:whatever => 'foo') }
              
  2) InventoryRefresh::Graph#to_graphviz prints the graph with layers
     Failure/Error: let(:node1) { OpenStruct.new(:whatever => 'foo') }
     
     NameError:
       uninitialized constant OpenStruct
     
         let(:node1) { OpenStruct.new(:whatever => 'foo') }
        
Finished in 13.96 seconds (files took 0.76564 seconds to load)
235 examples, 2 failures, 2 pending

Failed examples:

rspec ./spec/graph_spec.rb:22 # InventoryRefresh::Graph#to_graphviz prints the graph
rspec ./spec/graph_spec.rb:38 # InventoryRefresh::Graph#to_graphviz prints the graph with layers

https://github.com/ManageIQ/inventory_refresh/actions/runs/8856834572/job/24323579863?pr=130#step:6:139

@agrare agrare added bug Something isn't working test labels Apr 29, 2024
@agrare agrare requested a review from Fryguy as a code owner April 29, 2024 14:05
@miq-bot
Copy link
Member

miq-bot commented Apr 29, 2024

Checked commit agrare@5d4efeb with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@Fryguy
Copy link
Member

Fryguy commented Apr 29, 2024

I saw this in another gem and I think some version of json was released that dropped an inner dependency on ostruct.

@Fryguy Fryguy merged commit 451a44a into ManageIQ:master Apr 29, 2024
9 checks passed
@agrare agrare deleted the fix_missing_constant_open_struct branch April 29, 2024 15:48
agrare added a commit that referenced this pull request Aug 6, 2024
Fixed
- Fix rails 7 deprecation on ActiveRecord::Base.default_timezone (#124)
- Fix missing constant OpenStruct in tests (#131)

Added
- Test with ruby 3.2 and rails 7.1 (#122)
- Log destroy result when duplicate record is found (#120)
- Use ruby 3.1 and rails 7 for code coverage (#136)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants