Skip to content

Commit 81936b2

Browse files
committed
Style/PercentLiteralDelimiters
1 parent a85e66e commit 81936b2

14 files changed

+55
-55
lines changed

features/step_definitions/additional_cli_steps.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
require "rspec/rails/feature_check"
1313

1414
Then /^the example(s)? should( all)? pass$/ do |_, _|
15-
step %q{the output should contain "0 failures"}
16-
step %q{the exit status should be 0}
15+
step %q(the output should contain "0 failures")
16+
step %q(the exit status should be 0)
1717
end
1818

1919
Then /^the example(s)? should( all)? fail/ do |_, _|
20-
step %q{the output should not contain "0 failures"}
21-
step %q{the exit status should not be 0}
20+
step %q(the output should not contain "0 failures")
21+
step %q(the exit status should not be 0)
2222
end
2323

2424
Given /active job is available/ do

rspec-rails.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Gem::Specification.new do |s|
3535

3636
version_string = ['>= 4.2']
3737

38-
s.add_runtime_dependency %q<activesupport>, version_string
39-
s.add_runtime_dependency %q<actionpack>, version_string
40-
s.add_runtime_dependency %q<railties>, version_string
38+
s.add_runtime_dependency %q(activesupport), version_string
39+
s.add_runtime_dependency %q(actionpack), version_string
40+
s.add_runtime_dependency %q(railties), version_string
4141

4242
# in these blocks expected_rspec_version is set up to track the released
4343
# versions of RSpec. RSpec Rails does not have lock step versioning with the

spec/generators/rspec/channel/channel_generator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setup_default_destination
77

88
describe 'the generated files' do
9-
before { run_generator %w(chat) }
9+
before { run_generator %w[chat] }
1010

1111
subject { file("spec/channels/chat_channel_spec.rb") }
1212

spec/generators/rspec/controller/controller_generator_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
describe 'are not generated' do
5757
describe 'with no-view-spec flag' do
5858
before do
59-
run_generator %w(posts index show --no-view-specs)
59+
run_generator %w[posts index show --no-view-specs]
6060
end
6161
describe 'index.html.erb' do
6262
subject { file('spec/views/posts/index.html.erb_spec.rb') }
@@ -65,7 +65,7 @@
6565
end
6666
describe 'with no actions' do
6767
before do
68-
run_generator %w(posts)
68+
run_generator %w[posts]
6969
end
7070
describe 'index.html.erb' do
7171
subject { file('spec/views/posts/index.html.erb_spec.rb') }
@@ -75,7 +75,7 @@
7575

7676
describe 'with --no-template-engine' do
7777
before do
78-
run_generator %w(posts index --no-template-engine)
78+
run_generator %w[posts index --no-template-engine]
7979
end
8080

8181
describe 'index.html.erb' do
@@ -88,7 +88,7 @@
8888
describe 'are generated' do
8989
describe 'with default template engine' do
9090
before do
91-
run_generator %w(posts index show)
91+
run_generator %w[posts index show]
9292
end
9393
describe 'index.html.erb' do
9494
subject { file('spec/views/posts/index.html.erb_spec.rb') }
@@ -105,7 +105,7 @@
105105
end
106106
describe 'with haml' do
107107
before do
108-
run_generator %w(posts index --template_engine haml)
108+
run_generator %w[posts index --template_engine haml]
109109
end
110110
describe 'index.html.haml' do
111111
subject { file('spec/views/posts/index.html.haml_spec.rb') }
@@ -122,21 +122,21 @@
122122

123123
describe 'with no flag' do
124124
before do
125-
run_generator %w(posts seek and destroy)
125+
run_generator %w[posts seek and destroy]
126126
end
127127
it { is_expected.not_to exist }
128128
end
129129

130130
describe 'with --routing-specs flag' do
131131
describe 'without action parameter' do
132132
before do
133-
run_generator %w(posts --routing-specs)
133+
run_generator %w[posts --routing-specs]
134134
end
135135
it { is_expected.not_to exist }
136136
end
137137

138138
describe 'with action parameter' do
139-
before { run_generator %w(posts seek --routing-specs) }
139+
before { run_generator %w[posts seek --routing-specs] }
140140

141141
it { is_expected.to contain(/require 'rails_helper'/) }
142142
it { is_expected.to contain(/^RSpec.describe 'PostsController', #{type_metatag(:routing)}/) }
@@ -148,7 +148,7 @@
148148

149149
describe 'with --no-routing-specs flag' do
150150
before do
151-
run_generator %w(posts seek and destroy --no-routing_specs)
151+
run_generator %w[posts seek and destroy --no-routing_specs]
152152
end
153153
it { is_expected.not_to exist }
154154
end

spec/generators/rspec/feature/feature_generator_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
describe 'feature specs' do
99
describe 'are generated independently from the command line' do
1010
before do
11-
run_generator %w(posts)
11+
run_generator %w[posts]
1212
end
1313
describe 'the spec' do
1414
subject(:feature_spec) { file('spec/features/posts_spec.rb') }
@@ -26,7 +26,7 @@
2626

2727
describe 'are generated with the correct namespace' do
2828
before do
29-
run_generator %w(folder/posts)
29+
run_generator %w[folder/posts]
3030
end
3131
describe 'the spec' do
3232
subject(:feature_spec) { file('spec/features/folder/posts_spec.rb') }
@@ -41,7 +41,7 @@
4141

4242
describe 'are singularized appropriately with the --singularize flag' do
4343
before do
44-
run_generator %w(posts --singularize)
44+
run_generator %w[posts --singularize]
4545
end
4646
describe 'the spec' do
4747
subject(:feature_spec) { file('spec/features/post_spec.rb') }
@@ -56,7 +56,7 @@
5656

5757
describe "are not generated" do
5858
before do
59-
run_generator %w(posts --no-feature-specs)
59+
run_generator %w[posts --no-feature-specs]
6060
end
6161
describe "the spec" do
6262
subject(:feature_spec) { file('spec/features/posts_spec.rb') }

spec/generators/rspec/generator/generator_generator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
describe "generator specs" do
88
subject(:generator_spec) { file("spec/generator/posts_generator_spec.rb") }
99
before do
10-
run_generator %w(posts)
10+
run_generator %w[posts]
1111
end
1212
it "creates the spec file by default" do
1313
expect(generator_spec).to exist

spec/generators/rspec/helper/helper_generator_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
subject { file('spec/helpers/posts_helper_spec.rb') }
99
describe 'generated by default' do
1010
before do
11-
run_generator %w(posts)
11+
run_generator %w[posts]
1212
end
1313

1414
describe 'the spec' do
@@ -19,7 +19,7 @@
1919
end
2020
describe 'skipped with a flag' do
2121
before do
22-
run_generator %w(posts --no-helper_specs)
22+
run_generator %w[posts --no-helper_specs]
2323
end
2424
it { is_expected.not_to exist }
2525
end

spec/generators/rspec/job/job_generator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setup_default_destination
77

88
describe 'the generated files' do
9-
before { run_generator %w(user) }
9+
before { run_generator %w[user] }
1010

1111
subject { file('spec/jobs/user_job_spec.rb') }
1212

spec/generators/rspec/mailer/mailer_generator_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
subject { file('spec/mailers/posts_spec.rb') }
1010
describe 'a spec is created for each action' do
1111
before do
12-
run_generator %w(posts index show)
12+
run_generator %w[posts index show]
1313
end
1414
it { is_expected.to exist }
1515
it { is_expected.to contain(/require "rails_helper"/) }
@@ -20,7 +20,7 @@
2020
end
2121
describe 'creates placeholder when no actions specified' do
2222
before do
23-
run_generator %w(posts)
23+
run_generator %w[posts]
2424
end
2525
it { is_expected.to exist }
2626
it { is_expected.to contain(/require "rails_helper"/) }
@@ -30,7 +30,7 @@
3030

3131
describe 'a fixture is generated for each action' do
3232
before do
33-
run_generator %w(posts index show)
33+
run_generator %w[posts index show]
3434
end
3535
describe 'index' do
3636
subject { file('spec/fixtures/posts/index') }
@@ -47,7 +47,7 @@
4747
describe 'a preview is generated for each action', :skip => !RSpec::Rails::FeatureCheck.has_action_mailer_preview? do
4848
subject { file('spec/mailers/previews/posts_preview.rb') }
4949
before do
50-
run_generator %w(posts index show)
50+
run_generator %w[posts index show]
5151
end
5252
it { is_expected.to exist }
5353
it { is_expected.to contain(/class PostsPreview < ActionMailer::Preview/) }

spec/generators/rspec/model/model_generator_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setup_default_destination
77

88
it 'runs both the model and fixture tasks' do
9-
gen = generator %w(posts)
9+
gen = generator %w[posts]
1010
expect(gen).to receive :create_model_spec
1111
expect(gen).to receive :create_fixture_file
1212
gen.invoke_all
@@ -18,7 +18,7 @@
1818
describe 'the generated files' do
1919
describe 'without fixtures' do
2020
before do
21-
run_generator %w(posts)
21+
run_generator %w[posts]
2222
end
2323

2424
describe 'the fixtures' do

spec/generators/rspec/scaffold/scaffold_generator_spec.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
subject { file('spec/controllers/posts_controller_spec.rb') }
1010

1111
describe 'with no options' do
12-
before { run_generator %w(posts) }
12+
before { run_generator %w[posts] }
1313
it { is_expected.to contain(/require 'rails_helper'/) }
1414
it { is_expected.to contain(/^RSpec.describe PostsController, #{type_metatag(:controller)}/) }
1515
it { is_expected.to contain(/GET #new/) }
@@ -28,12 +28,12 @@
2828
end
2929

3030
describe 'with --no-controller_specs' do
31-
before { run_generator %w(posts --no-controller_specs) }
31+
before { run_generator %w[posts --no-controller_specs] }
3232
it { is_expected.not_to exist }
3333
end
3434

3535
describe 'with --api' do
36-
before { run_generator %w(posts --api) }
36+
before { run_generator %w[posts --api] }
3737
it { is_expected.to contain(/require 'rails_helper'/) }
3838
it { is_expected.to contain(/^RSpec.describe PostsController, #{type_metatag(:controller)}/) }
3939
it { is_expected.not_to contain(/GET #new/) }
@@ -53,13 +53,13 @@
5353

5454
describe 'namespaced controller spec' do
5555
subject { file('spec/controllers/admin/posts_controller_spec.rb') }
56-
before { run_generator %w(admin/posts) }
56+
before { run_generator %w[admin/posts] }
5757
it { is_expected.to contain(/^RSpec.describe Admin::PostsController, #{type_metatag(:controller)}/) }
5858
end
5959

6060
describe 'view specs' do
6161
describe 'with no options' do
62-
before { run_generator %w(posts) }
62+
before { run_generator %w[posts] }
6363

6464
describe 'edit' do
6565
subject { file("spec/views/posts/edit.html.erb_spec.rb") }
@@ -95,15 +95,15 @@
9595
end
9696

9797
describe 'with multiple integer attributes index' do
98-
before { run_generator %w(posts upvotes:integer downvotes:integer) }
98+
before { run_generator %w[posts upvotes:integer downvotes:integer] }
9999
subject { file("spec/views/posts/index.html.erb_spec.rb") }
100100
it { is_expected.to exist }
101101
it { is_expected.to contain('assert_select "tr>td", text: 2.to_s, count: 2') }
102102
it { is_expected.to contain('assert_select "tr>td", text: 3.to_s, count: 2') }
103103
end
104104

105105
describe 'with multiple float attributes index' do
106-
before { run_generator %w(posts upvotes:float downvotes:float) }
106+
before { run_generator %w[posts upvotes:float downvotes:float] }
107107
subject { file("spec/views/posts/index.html.erb_spec.rb") }
108108
it { is_expected.to exist }
109109
it { is_expected.to contain('assert_select "tr>td", text: 2.5.to_s, count: 2') }
@@ -112,7 +112,7 @@
112112

113113
if Rails.version.to_f >= 5.1
114114
describe 'with reference attribute' do
115-
before { run_generator %w(posts title:string author:references) }
115+
before { run_generator %w[posts title:string author:references] }
116116
describe 'edit' do
117117
subject { file("spec/views/posts/edit.html.erb_spec.rb") }
118118
it { is_expected.to contain(/assert_select "input\[name=\?\]", "post\[author_id\]/) }
@@ -127,7 +127,7 @@
127127
end
128128
else
129129
describe 'with reference attribute' do
130-
before { run_generator %w(posts title:string author:references) }
130+
before { run_generator %w[posts title:string author:references] }
131131
describe 'edit' do
132132
subject { file("spec/views/posts/edit.html.erb_spec.rb") }
133133
it { is_expected.to contain(/assert_select "input#(.*)_author_id\[name=\?\]", "\1\[author_id\]/) }
@@ -143,7 +143,7 @@
143143
end
144144

145145
describe 'with --no-template-engine' do
146-
before { run_generator %w(posts --no-template-engine) }
146+
before { run_generator %w[posts --no-template-engine] }
147147
describe 'edit' do
148148
subject { file("spec/views/posts/edit.html._spec.rb") }
149149
it { is_expected.not_to exist }
@@ -166,7 +166,7 @@
166166
end
167167

168168
describe 'with --api' do
169-
before { run_generator %w(posts --api) }
169+
before { run_generator %w[posts --api] }
170170

171171
describe 'edit' do
172172
subject { file("spec/views/posts/edit.html.erb_spec.rb") }
@@ -190,7 +190,7 @@
190190
end
191191

192192
describe 'with --no-view-specs' do
193-
before { run_generator %w(posts --no-view-specs) }
193+
before { run_generator %w[posts --no-view-specs] }
194194

195195
describe 'edit' do
196196
subject { file("spec/views/posts/edit.html.erb_spec.rb") }
@@ -218,7 +218,7 @@
218218
subject { file('spec/routing/posts_routing_spec.rb') }
219219

220220
describe 'with default options' do
221-
before { run_generator %w(posts) }
221+
before { run_generator %w[posts] }
222222
it { is_expected.to contain(/require "rails_helper"/) }
223223
it { is_expected.to contain(/^RSpec.describe PostsController, #{type_metatag(:routing)}/) }
224224
it { is_expected.to contain(/describe "routing"/) }
@@ -228,12 +228,12 @@
228228
end
229229

230230
describe 'with --no-routing-specs' do
231-
before { run_generator %w(posts --no-routing_specs) }
231+
before { run_generator %w[posts --no-routing_specs] }
232232
it { is_expected.not_to exist }
233233
end
234234

235235
describe 'with --api' do
236-
before { run_generator %w(posts --api) }
236+
before { run_generator %w[posts --api] }
237237
it { is_expected.not_to contain(/routes to #new/) }
238238
it { is_expected.not_to contain(/routes to #edit/) }
239239
end
@@ -242,7 +242,7 @@
242242
subject { file('spec/routing/api/v1/posts_routing_spec.rb') }
243243

244244
describe 'with default options' do
245-
before { run_generator %w(api/v1/posts) }
245+
before { run_generator %w[api/v1/posts] }
246246
it { is_expected.to contain(/^RSpec.describe Api::V1::PostsController, #{type_metatag(:routing)}/) }
247247
it { is_expected.to contain('route_to("api/v1/posts#new")') }
248248
end

spec/generators/rspec/system/system_generator_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
subject(:system_spec) { file("spec/system/posts_spec.rb") }
1111
describe "are generated independently from the command line" do
1212
before do
13-
run_generator %w(posts)
13+
run_generator %w[posts]
1414
end
1515
describe "the spec" do
1616
it "exists" do
@@ -27,7 +27,7 @@
2727

2828
describe "are not generated" do
2929
before do
30-
run_generator %w(posts --no-system-specs)
30+
run_generator %w[posts --no-system-specs]
3131
end
3232
describe "the spec" do
3333
it "does not exist" do

0 commit comments

Comments
 (0)