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

Can't run rspec to validate specs #10417

Closed
mfaani opened this issue Feb 9, 2021 · 2 comments
Closed

Can't run rspec to validate specs #10417

mfaani opened this issue Feb 9, 2021 · 2 comments

Comments

@mfaani
Copy link

mfaani commented Feb 9, 2021

Hi there,

I’ve tried to start a contribution a few times, I’m still stuck at the roots.
Here’s roughly what I’ve done:

  • Cloned cocoapods repo

  • Ran bundle install

  • FWIW when I runbundle config it's all empty.

  • Then from the root directory I just run rspec spec/functional/command_spec.rb and that fails. Like all attempts to run rspec fail for me on the project.
    I tried a bunch of solutions on SO, cloned again, went through multiple rspec tutorials. I can successfully run rspec somefile.rb and it works outside the repo, but I can’t figure out how to run the specs of the cocoapods repo. I get the following error:

/Library/Ruby/Gems/2.6.0/gems/rspec-core-3.10.0/lib/rspec/core/formatters.rb:212:in `require’: cannot load such file -- rspec/core/formatters/progress_formatter (LoadError)

Do I need to modify the Gemfile ? Or something?

@mfaani
Copy link
Author

mfaani commented Feb 9, 2021

I figured the solution:
rspec is not used. I just didn't know. Thought rspec was somehow Ruby's XCTest, but turns out you can use other things

See https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md#pull-requests and
https://guides.cocoapods.org/contributing/contribute-to-cocoapods.html

CocoaPods uses bacon as a test runner. To run all tests, use bundle exec rake spec in the root of the project. If you want to run a specific test instead, use bundle exec bacon spec/[folder]/[name]_spec.rb

@dnkoutso
Copy link
Contributor

Yes CocoaPods uses bacon to run its tests.

Will close for now.

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

No branches or pull requests

2 participants