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

Linting updates, spec fixes #680

Merged
merged 2 commits into from
Sep 24, 2018
Merged

Linting updates, spec fixes #680

merged 2 commits into from
Sep 24, 2018

Conversation

mob-sakai
Copy link
Contributor

This PR fixes to make Rake task succeed.

Refactor for rubocop:

  • spec/install-gem-in-bundler.gemfile:1:1: C: Naming/FileName: The name of this source file (install-gem-in-bundler.gemfile) should use snake_case.
  • lib/github_changelog_generator/parser_file.rb:33:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/parser_file.rb:48:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/generator/entry.rb:126:136: C: Layout/SpaceAfterColon: Space missing after colon.
  • lib/github_changelog_generator/generator/generator_fetcher.rb:90:11: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/generator/section.rb:59:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/generator/generator_processor.rb:123:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/generator/generator_processor.rb:126:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/octo_fetcher.rb:44:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/octo_fetcher.rb:255:9: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
  • lib/github_changelog_generator/options.rb:108:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.

Fix for spec:

expect(entry_sections.size).to eq 8
it "returns 9 sections" do
entry_sections.each { |sec| pp(sec.name) }
expect(entry_sections.size).to eq 9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you tell when this test began failing?

Has the behavior changed, like "there's a new expected Section"?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes! And you did!

expect(entry_sections.size).to eq 8
it "returns 9 sections" do
entry_sections.each { |sec| pp(sec.name) }
expect(entry_sections.size).to eq 9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes! And you did!

@olleolleolle olleolleolle changed the title Fix for Rake task Linting updates, spec fixes Sep 24, 2018
@olleolleolle olleolleolle merged commit 9b6c0f8 into github-changelog-generator:master Sep 24, 2018
it "returns 8 sections" do
expect(entry_sections.size).to eq 8
it "returns 9 sections" do
entry_sections.each { |sec| pp(sec.name) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, line 542 & line 727 are debug code...
entry_sections.each { |sec| pp(sec.name) } is unnecessary.

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.

2 participants