Skip to content

Commit 671760a

Browse files
committed
Cosmetic styling fixes
1 parent 15c4c44 commit 671760a

File tree

6 files changed

+10
-20
lines changed

6 files changed

+10
-20
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@ Layout/LineLength:
99
# Over time we'd like to get this down, but this is what we're at now.
1010
Metrics/MethodLength:
1111
Max: 43 # default: 10
12-
13-
# On 1.8 `proc` was `lambda`, so we used `Proc.new` to ensure we got real procs
14-
# on all supported versions.
15-
# http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/
16-
Style/Proc:
17-
Enabled: false

Rakefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace :generate do
6262

6363
# Rails 4+ cannot use a `rails` binstub generated by Bundler
6464
sh "rm -f #{bindir}/rails"
65-
sh "bundle exec rails new ./tmp/example_app --no-rc --skip-javascript --skip-bootsnap --skip-sprockets "\
65+
sh "bundle exec rails new ./tmp/example_app --no-rc --skip-javascript --skip-bootsnap --skip-sprockets " \
6666
"--skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
6767

6868
in_example_app do
@@ -187,9 +187,8 @@ namespace :no_active_record do
187187

188188
# Rails 4+ cannot use a `rails` binstub generated by Bundler
189189
sh "rm -f #{bindir}/rails"
190-
# rubocop:disable Layout/LineLength
191-
sh "bundle exec rails new #{example_app_dir} --no-rc --skip-active-record --skip-javascript --skip-bootsnap --skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
192-
# rubocop:enable Layout/LineLength
190+
sh "bundle exec rails new #{example_app_dir} --no-rc --skip-active-record --skip-javascript --skip-bootsnap " \
191+
"--skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
193192

194193
in_example_app(app_dir: example_app_dir) do
195194
sh "./travis_retry_bundle_install.sh 2>&1"

lib/rspec/rails/configuration.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def self.add_test_type_configurations(config)
5555
end
5656

5757
# @private
58-
# rubocop:disable Metrics/MethodLength
59-
def self.initialize_configuration(config)
58+
def self.initialize_configuration(config) # rubocop:disable Metrics/MethodLength
6059
config.backtrace_exclusion_patterns << /vendor\//
6160
config.backtrace_exclusion_patterns << %r{lib/rspec/rails}
6261

@@ -151,7 +150,6 @@ def filter_rails_from_backtrace!
151150
config.include RSpec::Rails::MailboxExampleGroup, type: :mailbox
152151
end
153152
end
154-
# rubocop:enable Metrics/MethodLength
155153

156154
initialize_configuration RSpec.configuration
157155
end

lib/rspec/rails/example/channel_example_group.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def channel_class
3434
next if klass <= ::ActionCable::Channel::Base
3535

3636
raise "Described class is not a channel class.\n" \
37-
"Specify the channel class in the `describe` statement "\
37+
"Specify the channel class in the `describe` statement " \
3838
"or set it manually using `tests MyChannelClass`"
3939
end
4040
end
@@ -45,7 +45,7 @@ def connection_class
4545
next if klass <= ::ActionCable::Connection::Base
4646

4747
raise "Described class is not a connection class.\n" \
48-
"Specify the connection class in the `describe` statement "\
48+
"Specify the connection class in the `describe` statement " \
4949
"or set it manually using `tests MyConnectionClass`"
5050
end
5151
end

script/after_update_travis_build.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ set -e
33

44
echo "Restoring custom Travis config"
55
mv .travis.yml{.update_backup,}
6-
7-
echo "Removing Base rubocop, Rspec-Rails does not use it"

spec/rspec/rails/active_model_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
end
1717

1818
it 'allows you to stub instances of `ActiveModel`' do
19-
# rubocop:disable Style/Semicolon
20-
klass = Class.new { include ActiveModel::AttributeMethods; attr_accessor :name }
21-
# rubocop:enable Style/Semicolon
19+
klass = Class.new do
20+
include ActiveModel::AttributeMethods
21+
attr_accessor :name
22+
end
2223
model = klass.new
2324
allow(model).to receive(:name) { 'stubbed name' }
2425
expect(model.name).to eq 'stubbed name'

0 commit comments

Comments
 (0)