Skip to content

Commit cbf9757

Browse files
committedApr 9, 2015
Rename Rspec pre-push hook to RSpec
This matches the name of the actual tool. While other tools we incorporate use lowercase for acronyms (e.g. `Jscs`), in this case it seems appropriate to stick with the name of the tool as it isn't an acronym.
1 parent bc68a7c commit cbf9757

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
 

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* Don't clear working tree after pre-commit hook when only submodule changes
3737
are present
3838
* Change hook summary message to mention warnings if there were any
39-
* Add `Rspec` pre-push hook that runs Rspec tests before pushing to remote
39+
* Add `RSpec` pre-push hook that runs RSpec tests before pushing to remote
4040
* Add `ProtectedBranches` pre-push hook that prevents destructive pushes
4141
(deletions or force pushes) to specified branches
4242
* Add `SpellCheck` commit-msg hook to check commit messages for misspelled words

‎config/default.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,9 @@ PrePush:
542542
description: 'Checking for illegal pushes to protected branches'
543543
branches: ['master']
544544

545-
Rspec:
545+
RSpec:
546546
enabled: false
547-
description: 'Running rspec test suite'
547+
description: 'Running RSpec test suite'
548548
required_executable: 'rspec'
549549

550550
# Hooks that run during `git rebase`, before any commits are rebased.

‎lib/overcommit/hook/pre_push/rspec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Overcommit::Hook::PrePush
22
# Runs `rspec` test suite before push
3-
class Rspec < Base
3+
class RSpec < Base
44
def run
55
result = execute(command)
66
return :pass if result.success?

‎spec/overcommit/hook/pre_push/rspec_spec.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'spec_helper'
22

3-
describe Overcommit::Hook::PrePush::Rspec do
3+
describe Overcommit::Hook::PrePush::RSpec do
44
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
55
let(:context) { double('context') }
66
subject { described_class.new(config, context) }
@@ -55,12 +55,12 @@
5555
5656
Failures:
5757
58-
1) Overcommit::Hook::PrePush::Rspec when rspec exits unsuccessfully with a runtime error should fail
58+
1) Overcommit::Hook::PrePush::RSpec when rspec exits unsuccessfully with a runtime error should fail
5959
Failure/Error: it { should fail_hook }
6060
expected that the hook would fail
6161
# ./spec/overcommit/hook/pre_push/rspec_spec.rb:45:in `block (4 levels) in <top (required)>'
6262
63-
2) Overcommit::Hook::PrePush::Rspec when rspec exits unsuccessfully with a test failure should fail
63+
2) Overcommit::Hook::PrePush::RSpec when rspec exits unsuccessfully with a test failure should fail
6464
Failure/Error: it { should fail_hook }
6565
expected that the hook would fail
6666
# ./spec/overcommit/hook/pre_push/rspec_spec.rb:57:in `block (4 levels) in <top (required)>'
@@ -70,8 +70,8 @@
7070
7171
Failed examples:
7272
73-
rspec ./spec/overcommit/hook/pre_push/rspec_spec.rb:45 # Overcommit::Hook::PrePush::Rspec when rspec exits unsuccessfully with a runtime error should fail
74-
rspec ./spec/overcommit/hook/pre_push/rspec_spec.rb:57 # Overcommit::Hook::PrePush::Rspec when rspec exits unsuccessfully with a test failure should fail
73+
rspec ./spec/overcommit/hook/pre_push/rspec_spec.rb:45 # Overcommit::Hook::PrePush::RSpec when rspec exits unsuccessfully with a runtime error should fail
74+
rspec ./spec/overcommit/hook/pre_push/rspec_spec.rb:57 # Overcommit::Hook::PrePush::RSpec when rspec exits unsuccessfully with a test failure should fail
7575
EOS
7676
# rubocop:enable Metrics/LineLength
7777
end

0 commit comments

Comments
 (0)
Please sign in to comment.