Skip to content

Commit 62fedf1

Browse files
committed
Update rocket hash
1 parent 3cdd775 commit 62fedf1

24 files changed

+133
-133
lines changed

Capybara.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ behavior and accepting the risks associated with doing so:
7373

7474
# not recommended!
7575
RSpec.configure do |c|
76-
c.include Capybara::DSL, :file_path => "spec/requests"
76+
c.include Capybara::DSL, file_path: "spec/requests"
7777
end

Changelog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,10 @@ Enhancements:
344344
* Improve controller and routing spec calls to `routes` by using `yield`
345345
instead of `call`. (Anton Davydov, #1308)
346346
* Add support for `ActiveJob` specs as standard `RSpec::Rails::RailsExampleGoup`s
347-
via both `:type => :job` and inferring type from spec directory `spec/jobs`.
347+
via both `type: :job` and inferring type from spec directory `spec/jobs`.
348348
(Gabe Martin-Dempesy, #1361)
349349
* Include `RSpec::Rails::FixtureSupport` into example groups using metadata
350-
`:use_fixtures => true`. (Aaron Kromer, #1372)
350+
`use_fixtures: true`. (Aaron Kromer, #1372)
351351
* Include `rspec:request` generator for generating request specs; this is an
352352
alias of `rspec:integration` (Aaron Kromer, #1378)
353353
* Update `rails_helper` generator with a default check to abort the spec run
@@ -488,7 +488,7 @@ Enhancements:
488488
Bug Fixes:
489489

490490
* Fix an inconsistency in the generated scaffold specs for a controller. (Andy Waite)
491-
* Ensure `config.before(:all, :type => <type>)` hooks run before groups
491+
* Ensure `config.before(:all, type: <type>)` hooks run before groups
492492
of the given type, even when the type is inferred by the file
493493
location. (Jon Rowe, Myron Marston)
494494
* Switch to parsing params with `Rack::Utils::parse_nested_query` to match Rails.
@@ -938,7 +938,7 @@ This release is compatible with rails-3.1.0.rc1, but not rails-3.1.0.beta1
938938
* Enhancements
939939
* include ApplicationHelper in helper object in helper specs
940940
* include request spec extensions in files in spec/integration
941-
* include controller spec extensions in groups that use :type => :controller
941+
* include controller spec extensions in groups that use type: :controller
942942
* same for :model, :view, :helper, :mailer, :request, :routing
943943

944944
* Bug fixes

Gemfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ gemspec
77
rspec_dependencies_gemfile = File.expand_path("../Gemfile-rspec-dependencies", __FILE__)
88
eval_gemfile rspec_dependencies_gemfile
99

10-
gem 'yard', '~> 0.8.7', :require => false
10+
gem 'yard', '~> 0.8.7', require: false
1111

1212
### deps for rdoc.info
1313
group :documentation do
14-
gem 'redcarpet', '~> 3.4.0', platforms: [:ruby]
1514
gem 'github-markup', '~> 3.0.3'
15+
gem 'redcarpet', '~> 3.4.0', platforms: [:ruby]
1616
gem 'relish', '~> 0.7.1'
1717
end
1818

@@ -36,8 +36,8 @@ else
3636
end
3737

3838
if MAJOR >= 6
39+
gem 'selenium-webdriver', '~> 3.5', require: false
3940
gem 'sqlite3', '~> 1.4', platforms: [:ruby]
40-
gem 'selenium-webdriver', '~> 3.5', :require => false
4141
else
4242
gem 'sqlite3', '~> 1.3.6', platforms: [:ruby]
4343
end
@@ -57,7 +57,7 @@ if RUBY_VERSION < '2.4.0'
5757
gem 'minitest', '< 5.12.0'
5858
end
5959

60-
gem 'capybara', '~> 2.13', :require => false
60+
gem 'capybara', '~> 2.13', require: false
6161

6262
if MAJOR < 6
6363
gem 'nokogiri', '1.8.5'

features/matchers/have_broadcasted_matcher.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Feature: have_broadcasted matcher
104104
"""ruby
105105
require "rails_helper"
106106
107-
RSpec.describe ChatChannel, :type => :channel do
107+
RSpec.describe ChatChannel, type: :channel do
108108
it "successfully subscribes" do
109109
user = User.new(42)
110110

features/matchers/have_enqueued_mail_matcher.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Feature: have_enqueued_mail matcher
3333
it "matches with enqueued mailer" do
3434
ActiveJob::Base.queue_adapter = :test
3535
expect {
36-
NotificationsMailer.signup.deliver_later(:wait_until => Date.tomorrow.noon)
36+
NotificationsMailer.signup.deliver_later(wait_until: Date.tomorrow.noon)
3737
}.to have_enqueued_mail.at(Date.tomorrow.noon)
3838
end
3939
end

lib/generators/rspec/scaffold/templates/index_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
it "renders a list of <%= ns_table_name %>" do
2020
render
2121
<% for attribute in output_attributes -%>
22-
assert_select "tr>td", text: <%= value_for(attribute) %>.to_s, :count => 2
22+
assert_select "tr>td", text: <%= value_for(attribute) %>.to_s, count: 2
2323
<% end -%>
2424
end
2525
end

lib/rspec-rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Railtie < ::Rails::Railtie
3131
# This is called after the environment has been loaded but before Rails
3232
# sets the default for the `preview_path`
3333
initializer "rspec_rails.action_mailer",
34-
:before => "action_mailer.set_configs" do |app|
34+
before: "action_mailer.set_configs" do |app|
3535
setup_preview_path(app)
3636
end
3737

lib/rspec/rails/configuration.rb

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,33 @@ class Configuration
2525
#
2626
# @api private
2727
DIRECTORY_MAPPINGS = {
28-
:channel => %w[spec channels],
29-
:controller => %w[spec controllers],
30-
:helper => %w[spec helpers],
31-
:job => %w[spec jobs],
32-
:mailer => %w[spec mailers],
33-
:model => %w[spec models],
34-
:request => %w[spec (requests|integration|api)],
35-
:routing => %w[spec routing],
36-
:view => %w[spec views],
37-
:feature => %w[spec features],
38-
:system => %w[spec system],
39-
:mailbox => %w[spec mailboxes]
28+
channel: %w[spec channels],
29+
controller: %w[spec controllers],
30+
helper: %w[spec helpers],
31+
job: %w[spec jobs],
32+
mailer: %w[spec mailers],
33+
model: %w[spec models],
34+
request: %w[spec (requests|integration|api)],
35+
routing: %w[spec routing],
36+
view: %w[spec views],
37+
feature: %w[spec features],
38+
system: %w[spec system],
39+
mailbox: %w[spec mailboxes]
4040
}
4141

4242
# Sets up the different example group modules for the different spec types
4343
#
4444
# @api private
4545
def self.add_test_type_configurations(config)
46-
config.include RSpec::Rails::ControllerExampleGroup, :type => :controller
47-
config.include RSpec::Rails::HelperExampleGroup, :type => :helper
48-
config.include RSpec::Rails::ModelExampleGroup, :type => :model
49-
config.include RSpec::Rails::RequestExampleGroup, :type => :request
50-
config.include RSpec::Rails::RoutingExampleGroup, :type => :routing
51-
config.include RSpec::Rails::ViewExampleGroup, :type => :view
52-
config.include RSpec::Rails::FeatureExampleGroup, :type => :feature
46+
config.include RSpec::Rails::ControllerExampleGroup, type: :controller
47+
config.include RSpec::Rails::HelperExampleGroup, type: :helper
48+
config.include RSpec::Rails::ModelExampleGroup, type: :model
49+
config.include RSpec::Rails::RequestExampleGroup, type: :request
50+
config.include RSpec::Rails::RoutingExampleGroup, type: :routing
51+
config.include RSpec::Rails::ViewExampleGroup, type: :view
52+
config.include RSpec::Rails::FeatureExampleGroup, type: :feature
5353
config.include RSpec::Rails::Matchers
54-
config.include RSpec::Rails::SystemExampleGroup, :type => :system
54+
config.include RSpec::Rails::SystemExampleGroup, type: :system
5555
end
5656

5757
# @private
@@ -61,10 +61,10 @@ def self.initialize_configuration(config)
6161
config.backtrace_exclusion_patterns << %r{lib/rspec/rails}
6262

6363
# controller settings
64-
config.add_setting :infer_base_class_for_anonymous_controllers, :default => true
64+
config.add_setting :infer_base_class_for_anonymous_controllers, default: true
6565

6666
# fixture support
67-
config.add_setting :use_transactional_fixtures, :alias_with => :use_transactional_examples
67+
config.add_setting :use_transactional_fixtures, alias_with: :use_transactional_examples
6868
config.add_setting :use_instantiated_fixtures
6969
config.add_setting :global_fixtures
7070
config.add_setting :fixture_path
@@ -80,7 +80,7 @@ def self.initialize_configuration(config)
8080
config.include RSpec::Rails::FixtureSupport
8181

8282
if ::Rails::VERSION::STRING > '5'
83-
config.add_setting :file_fixture_path, :default => 'spec/fixtures/files'
83+
config.add_setting :file_fixture_path, default: 'spec/fixtures/files'
8484
config.include RSpec::Rails::FileFixtureSupport
8585
end
8686

@@ -93,7 +93,7 @@ def self.initialize_configuration(config)
9393
# as a getter. This makes it easier for rspec-rails users because we use
9494
# `render_views` directly in example groups, so this aligns the two APIs,
9595
# but requires this workaround:
96-
config.add_setting :rendering_views, :default => false
96+
config.add_setting :rendering_views, default: false
9797

9898
config.instance_exec do
9999
def render_views=(val)
@@ -111,7 +111,7 @@ def render_views?
111111
def infer_spec_type_from_file_location!
112112
DIRECTORY_MAPPINGS.each do |type, dir_parts|
113113
escaped_path = Regexp.compile(dir_parts.join('[\\\/]') + '[\\\/]')
114-
define_derived_metadata(:file_path => escaped_path) do |metadata|
114+
define_derived_metadata(file_path: escaped_path) do |metadata|
115115
metadata[:type] ||= type
116116
end
117117
end
@@ -129,26 +129,26 @@ def filter_rails_from_backtrace!
129129

130130
if defined?(::Rails::Controller::Testing)
131131
[:controller, :view, :request].each do |type|
132-
config.include ::Rails::Controller::Testing::TestProcess, :type => type
133-
config.include ::Rails::Controller::Testing::TemplateAssertions, :type => type
134-
config.include ::Rails::Controller::Testing::Integration, :type => type
132+
config.include ::Rails::Controller::Testing::TestProcess, type: type
133+
config.include ::Rails::Controller::Testing::TemplateAssertions, type: type
134+
config.include ::Rails::Controller::Testing::Integration, type: type
135135
end
136136
end
137137

138138
if RSpec::Rails::FeatureCheck.has_action_mailer?
139-
config.include RSpec::Rails::MailerExampleGroup, :type => :mailer
139+
config.include RSpec::Rails::MailerExampleGroup, type: :mailer
140140
end
141141

142142
if RSpec::Rails::FeatureCheck.has_active_job?
143-
config.include RSpec::Rails::JobExampleGroup, :type => :job
143+
config.include RSpec::Rails::JobExampleGroup, type: :job
144144
end
145145

146146
if RSpec::Rails::FeatureCheck.has_action_cable_testing?
147-
config.include RSpec::Rails::ChannelExampleGroup, :type => :channel
147+
config.include RSpec::Rails::ChannelExampleGroup, type: :channel
148148
end
149149

150150
if RSpec::Rails::FeatureCheck.has_action_mailbox?
151-
config.include RSpec::Rails::MailboxExampleGroup, :type => :mailbox
151+
config.include RSpec::Rails::MailboxExampleGroup, type: :mailbox
152152
end
153153
end
154154
# rubocop:enable Metrics/MethodLength

lib/rspec/rails/example/controller_example_group.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def self.name
9494
self.routes = ActionDispatch::Routing::RouteSet.new.tap do |r|
9595
r.draw do
9696
resources resource_name,
97-
:as => resource_as,
98-
:module => resource_module,
99-
:path => resource_path
97+
as: resource_as,
98+
module: resource_module,
99+
path: resource_path
100100
end
101101
end
102102
end
@@ -159,7 +159,7 @@ def rescue_with_handler(exception)
159159
#
160160
# expect do
161161
# bypass_rescue
162-
# get :show, :id => profile.id + 1
162+
# get :show, id: profile.id + 1
163163
# end.to raise_error(/403 Forbidden/)
164164
# end
165165
# end

lib/rspec/rails/example/feature_example_group.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def visit(*)
3737

3838
unless RSpec.respond_to?(:feature)
3939
opts = {
40-
:capybara_feature => true,
41-
:type => :feature,
42-
:skip => <<-EOT.squish
40+
capybara_feature: true,
41+
type: :feature,
42+
skip: <<-EOT.squish
4343
Feature specs require the Capybara (https://github.com/jnicklas/capybara)
4444
gem, version 2.2.0 or later. We recommend version 2.4.0 or later to avoid
4545
some deprecation warnings and have support for
@@ -63,7 +63,7 @@ def visit(*)
6363
main_feature = nil unless c.expose_dsl_globally?
6464
c.alias_example_group_to :feature, opts
6565
c.alias_example_to :scenario
66-
c.alias_example_to :xscenario, :skip => 'Temporarily skipped with xscenario'
66+
c.alias_example_to :xscenario, skip: 'Temporarily skipped with xscenario'
6767
end
6868

6969
# Due to load order issues and `config.expose_dsl_globally?` defaulting to

lib/rspec/rails/example/view_example_group.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ module ExampleMethods
5050
end
5151

5252
# @overload render
53-
# @overload render({:partial => path_to_file})
54-
# @overload render({:partial => path_to_file}, {... locals ...})
55-
# @overload render({:partial => path_to_file}, {... locals ...}) do ... end
53+
# @overload render({partial: path_to_file})
54+
# @overload render({partial: path_to_file}, {... locals ...})
55+
# @overload render({partial: path_to_file}, {... locals ...}) do ... end
5656
#
5757
# Delegates to ActionView::Base#render, so see documentation on that
5858
# for more info.
@@ -62,7 +62,7 @@ module ExampleMethods
6262
#
6363
# describe "widgets/new.html.erb" do
6464
# it "shows all the widgets" do
65-
# render # => view.render(:file => "widgets/new.html.erb")
65+
# render # => view.render(file: "widgets/new.html.erb")
6666
# # ...
6767
# end
6868
# end
@@ -105,7 +105,7 @@ def params
105105

106106
# @deprecated Use `view` instead.
107107
def template
108-
RSpec.deprecate("template", :replacement => "view")
108+
RSpec.deprecate("template", replacement: "view")
109109
view
110110
end
111111

@@ -152,7 +152,7 @@ def _default_render_options
152152
# the original string.
153153
match = path_regex.match(_default_file_to_render)
154154

155-
render_options = { :template => match[:template] }
155+
render_options = { template: match[:template] }
156156
render_options[:handlers] = [match[:handler]] if match[:handler]
157157
render_options[:formats] = [match[:format].to_sym] if match[:format]
158158
render_options[:locales] = [match[:locale]] if match[:locale]

lib/rspec/rails/fixture_file_upload_support.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module RSpec
22
module Rails
33
# @private
44
module FixtureFileUploadSupport
5-
delegate :fixture_file_upload, :to => :rails_fixture_file_wrapper
5+
delegate :fixture_file_upload, to: :rails_fixture_file_wrapper
66

77
private
88

lib/rspec/rails/matchers/action_cable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module ActionCable
4848
def have_broadcasted_to(target = nil)
4949
check_action_cable_adapter
5050

51-
ActionCable::HaveBroadcastedTo.new(target, :channel => described_class)
51+
ActionCable::HaveBroadcastedTo.new(target, channel: described_class)
5252
end
5353
alias_method :broadcast_to, :have_broadcasted_to
5454

lib/rspec/rails/matchers/have_http_status.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ def failure_message_when_negated
293293
protected
294294

295295
RESPONSE_METHODS = {
296-
:success => 'successful',
297-
:error => 'server_error',
298-
:missing => 'not_found'
296+
success: 'successful',
297+
error: 'server_error',
298+
missing: 'not_found'
299299
}.freeze
300300

301301
def check_expected_status(test_response, expected)

0 commit comments

Comments
 (0)