TheOdinProject / ruby-exercises

MIT License
219 stars 1.06k forks source link

Provide instructions to install and use RSpec globally #80

Closed JoshDevHub closed 1 year ago

JoshDevHub commented 1 year ago

Because

This PR was made because of users running into issues with bundler and debugging. These exercises were having learners install RSpec in this project with bundle install and running bundle exec rspec to run the tests. This works until the debugging exercises, where running code with bundle exec will create issues with loading the user's debug gem. This is especially confusing for learners at this stage because they have very little context for what these commands are doing, what bundler is, how require works, etc.

This PR

Issue

Closes #72

Additional Information

A few additional concerns:

Pull Request Requirements

ChargrilledChook commented 1 year ago

Thanks for doing this @JoshDevHub, much appreciated. I'll give a more thorough review when I get the chance but to touch on a few of your questions:

Is the Gemfile necessary now? I'd be glad to make an additional commit to remove it if it's deemed unnecessary.

I don't think so. The only advantage would be using it to get people to download a fixed version of RSpec. I think we can get rid of it. I would probably also get rid of the .ruby-version file - without the gemfile we don't need to be so rigid on this part either.

Shall I also update the instructions in the solutions branch? On one hand, it doesn't seem like a big deal to have the instructions correct in the solutions branch, but on the other, probably good to keep them in sync. Wasn't 100% sure what to do about that.

If you could that would be great - should be able to do this by just merging main into the branch after this set of changes is complete. I may even have an option to do it directly from GH, we can check back on this after this is done

In the curriculum's debugging lesson, this note will no longer be relevant after this PR is merged in. Would be glad to go and put in a PR to remove it after this is merged.

Good idea :+1:

Since users will now have RSpec globally installed, we may want to adjust some things in the Introduction to RSpec lesson later in the curriculum? That lesson is currently assuming that the learner won't have RSpec installed.

Doesn't hurt having a touch of repetition here I think - no harm in installing the gem again. We could add a note mentioning that you may already have done this for the exercises, but don't think it's a big deal either way

JoshDevHub commented 1 year ago

Put in a commit to remove Gemfile, Gemfile.lock, and .ruby-version files. Seems ready for a merge unless there's anything else? I'll get started on the PR for removing that little note in the debugging lesson. I also agree with you on the Introduction to RSpec lesson -- the repetition isn't all that significant.