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

Use next_rails namespace on spec tests. #117

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

JuanVqz
Copy link
Member

@JuanVqz JuanVqz commented May 19, 2024

Description

There were some unnecessary require_relative calls in the spec files, so I removed them and organized the test suite according to the classes in the library folder.

Motivation and Context

When creating additional classes within the NextRails namespace, it became challenging to utilize require_relative calls for loading the classes in spec files.

How Has This Been Tested?

The test suite should still pass.

Screenshots:

I will abide by the code of conduct

require "tempfile"
require_relative "spec_helper"
require_relative "../lib/deprecation_tracker"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case we still need the require_relatvie because the deprecation_tracker class is out of the next_rails namespace. 👍

expect(output).to match "gems incompatible with Rails 7.0"
end
end
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these tests were moved from spec/bundle_report_spec.rb

@JuanVqz JuanVqz force-pushed the fix-namespace-specs branch 2 times, most recently from 268760f to 23a499f Compare May 19, 2024 20:09
@JuanVqz JuanVqz marked this pull request as ready for review May 19, 2024 20:09
@JuanVqz JuanVqz changed the title Fix spec namespaces Use next_rails namespace on spec tests. May 19, 2024
@JuanVqz JuanVqz requested review from etagwerker, arielj, fbuys and rishijain and removed request for fbuys May 19, 2024 20:11
@JuanVqz JuanVqz force-pushed the fix-namespace-specs branch from 23a499f to 6d20ef4 Compare May 20, 2024 04:57

RSpec.describe NextRails::GemInfo do
describe "#state" do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuanVqz we do not need these specs anymore? #state and #find_latest_compatible

Copy link
Member Author

@JuanVqz JuanVqz Sep 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julioalucero thank you for catching it! I fixed it already, please feel free to review it again when possible 👍

@JuanVqz JuanVqz force-pushed the fix-namespace-specs branch 2 times, most recently from 1b19c08 to 91714b2 Compare September 22, 2024 06:28
@JuanVqz
Copy link
Member Author

JuanVqz commented Sep 22, 2024

Test for Ruby 3 are failing because it needs this fix bug first #125

Update:
After rebasing against the main branch only Ruby 2 CI runners are failing which is related to the Rainbow update, so, this is ready to go.

@JuanVqz JuanVqz force-pushed the fix-namespace-specs branch 2 times, most recently from a4cb607 to a0d63b9 Compare September 23, 2024 14:56
There were some not needed `require_relative` calls if the `spec` folder
were ordered according to the `lib` folder.

So, I removed them and organized the test suite accordingly the classes at library
@JuanVqz JuanVqz force-pushed the fix-namespace-specs branch from a0d63b9 to e9a816b Compare September 24, 2024 04:56
Copy link
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuanVqz Looks good, thanks!

@etagwerker etagwerker merged commit f226eb8 into main Sep 24, 2024
6 checks passed
@etagwerker etagwerker deleted the fix-namespace-specs branch September 24, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants