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

Install and use RuboCop RSpec by default. #4948

Merged
merged 4 commits into from Sep 20, 2018

Conversation

Projects
None yet
2 participants
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Sep 20, 2018

Now that we're getting more PRs for #4763 and are encouraging more tests to be
written when coverage drops we should try to enforce RuboCop RSpec style by
default.

As a result, use the gem by default, autofix things where we can and generate a
.rubocop_todo.yml for the rest.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@wafflebot wafflebot bot added the in progress label Sep 20, 2018

@MikeMcQuaid MikeMcQuaid referenced this pull request Sep 20, 2018

Closed

More tests #4946

6 of 6 tasks complete

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:rubocop-rspec-default branch from 05e85e6 to d01c6c8 Sep 20, 2018

MikeMcQuaid added some commits Sep 20, 2018

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:rubocop-rspec-default branch from d01c6c8 to 359fb27 Sep 20, 2018

@MikeMcQuaid MikeMcQuaid merged commit 8125aba into Homebrew:master Sep 20, 2018

3 checks passed

codecov/patch 100% of diff hit (target 71.23%)
Details
codecov/project Absolute coverage decreased by -0.01% but relative coverage increased by +28.77% compared to 2901c36
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:rubocop-rspec-default branch Sep 20, 2018

@wafflebot wafflebot bot removed the in progress label Sep 20, 2018

allow(subject).to receive(:cache_path).and_return(cache_path)
end

context "`cache_path.exist?` returns `true`" do
before(:each) do
context "`File.exist?(cache_path)` returns `true`" do

This comment has been minimized.

@reitermarkus

reitermarkus Sep 20, 2018

Member

What is this change about?

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Sep 21, 2018

Member

Bad rebase, will fix.

@@ -245,15 +245,15 @@ def setup_git_repo
let(:url) { "https://example.com/foo.tar.gz/from/this/mirror" }

it {
is_expected.to eq(
expect(subject).to eq(

This comment has been minimized.

@reitermarkus

reitermarkus Sep 20, 2018

Member

This also seems wrong.

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Sep 21, 2018

Member

@reitermarkus RuboCop RSpec doesn't like is_expected.

This comment has been minimized.

@reitermarkus

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Sep 22, 2018

Member

It said uses of the subject should not be implicit.

This comment has been minimized.

@reitermarkus

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Sep 23, 2018

Member

@reitermarkus Cool, apologies for applying the autofix unthinkingly then. Happy to see it changed back 👍

MikeMcQuaid added a commit to MikeMcQuaid/brew that referenced this pull request Sep 21, 2018

@MikeMcQuaid MikeMcQuaid referenced this pull request Sep 21, 2018

Merged

cache_store_spec: fix bad rebase. #4960

5 of 6 tasks complete

@lock lock bot added the outdated label Oct 23, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.