File tree Expand file tree Collapse file tree 6 files changed +10
-20
lines changed Expand file tree Collapse file tree 6 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,3 @@ Layout/LineLength:
9
9
# Over time we'd like to get this down, but this is what we're at now.
10
10
Metrics/MethodLength :
11
11
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
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ namespace :generate do
62
62
63
63
# Rails 4+ cannot use a `rails` binstub generated by Bundler
64
64
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 " \
66
66
"--skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
67
67
68
68
in_example_app do
@@ -187,9 +187,8 @@ namespace :no_active_record do
187
187
188
188
# Rails 4+ cannot use a `rails` binstub generated by Bundler
189
189
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"
193
192
194
193
in_example_app ( app_dir : example_app_dir ) do
195
194
sh "./travis_retry_bundle_install.sh 2>&1"
Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ def self.add_test_type_configurations(config)
55
55
end
56
56
57
57
# @private
58
- # rubocop:disable Metrics/MethodLength
59
- def self . initialize_configuration ( config )
58
+ def self . initialize_configuration ( config ) # rubocop:disable Metrics/MethodLength
60
59
config . backtrace_exclusion_patterns << /vendor\/ /
61
60
config . backtrace_exclusion_patterns << %r{lib/rspec/rails}
62
61
@@ -151,7 +150,6 @@ def filter_rails_from_backtrace!
151
150
config . include RSpec ::Rails ::MailboxExampleGroup , type : :mailbox
152
151
end
153
152
end
154
- # rubocop:enable Metrics/MethodLength
155
153
156
154
initialize_configuration RSpec . configuration
157
155
end
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def channel_class
34
34
next if klass <= ::ActionCable ::Channel ::Base
35
35
36
36
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 " \
38
38
"or set it manually using `tests MyChannelClass`"
39
39
end
40
40
end
@@ -45,7 +45,7 @@ def connection_class
45
45
next if klass <= ::ActionCable ::Connection ::Base
46
46
47
47
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 " \
49
49
"or set it manually using `tests MyConnectionClass`"
50
50
end
51
51
end
Original file line number Diff line number Diff line change 3
3
4
4
echo " Restoring custom Travis config"
5
5
mv .travis.yml{.update_backup,}
6
-
7
- echo " Removing Base rubocop, Rspec-Rails does not use it"
Original file line number Diff line number Diff line change 16
16
end
17
17
18
18
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
22
23
model = klass . new
23
24
allow ( model ) . to receive ( :name ) { 'stubbed name' }
24
25
expect ( model . name ) . to eq 'stubbed name'
You can’t perform that action at this time.
0 commit comments