Skip to content

Commit 8ec95d3

Browse files
committed
Fix Rails and RSpec integration branch references
Some of them are off, and should better be referenced by a ref. GitHub performs a redirect from master to main.
1 parent 4386901 commit 8ec95d3

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

benchmarks/before_block_capture_block_vs_yield.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def capture_block_and_call_n_times(n, &block)
4242
example context.
4343

4444
rspec-core has already performed [many related benchmarks about
45-
this](https://github.com/rspec/rspec-core/tree/master/benchmarks):
45+
this](https://github.com/rspec/rspec-core/tree/main/benchmarks):
4646

47-
- [call vs yield](https://github.com/rspec/rspec-core/blob/master/benchmarks/call_v_yield.rb)
48-
- [capture block vs yield](https://github.com/rspec/rspec-core/blob/master/benchmarks/capture_block_vs_yield.rb)
49-
- [flat map vs inject](https://github.com/rspec/rspec-core/blob/master/benchmarks/flat_map_vs_inject.rb)
47+
- [call vs yield](https://github.com/rspec/rspec-core/blob/main/benchmarks/call_v_yield.rb)
48+
- [capture block vs yield](https://github.com/rspec/rspec-core/blob/main/benchmarks/capture_block_vs_yield.rb)
49+
- [flat map vs inject](https://github.com/rspec/rspec-core/blob/main/benchmarks/flat_map_vs_inject.rb)
5050

5151
The results are very interesting:
5252

@@ -64,7 +64,7 @@ def capture_block_and_call_n_times(n, &block)
6464
> See also `flat_map_vs_inject.rb`, which appears to contradict these
6565
> results a little bit.
6666
>
67-
> -- https://github.com/rspec/rspec-core/blob/master/benchmarks/capture_block_vs_yield.rb#L83-L95
67+
> -- https://github.com/rspec/rspec-core/blob/main/benchmarks/capture_block_vs_yield.rb#L83-L95
6868

6969
and
7070

@@ -75,7 +75,7 @@ def capture_block_and_call_n_times(n, &block)
7575
> version remains faster in my benchmarks here no matter how small
7676
> I shrink the `words` array. I'm not sure why!
7777
>
78-
> -- https://github.com/rspec/rspec-core/blob/master/benchmarks/flat_map_vs_inject.rb#L37-L42
78+
> -- https://github.com/rspec/rspec-core/blob/main/benchmarks/flat_map_vs_inject.rb#L37-L42
7979

8080
This seems to show that the error margin is enough to negate any benefit from
8181
capturing the block initially. It also shows that not capturing the block is

features/controller_specs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Controller specs are marked by `:type => :controller` or if you have set
22
`config.infer_spec_type_from_file_location!` by placing them in `spec/controllers`.
33

44
A controller spec is an RSpec wrapper for a Rails functional test
5-
([ActionController::TestCase::Behavior](https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/test_case.rb)).
5+
([ActionController::TestCase::Behavior](https://github.com/rails/rails/blob/main/actionpack/lib/action_controller/test_case.rb)).
66
It allows you to simulate a single http request in each example, and then
77
specify expected outcomes such as:
88

lib/rspec/rails/matchers/have_http_status.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The following code inspired and modified from Rails' `assert_response`:
22
#
3-
# https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/assertions/response.rb#L22-L38
3+
# https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/assertions/response.rb#L22-L38
44
#
55
# Thank you to all the Rails devs who did the heavy lifting on this!
66

@@ -243,7 +243,7 @@ class GenericStatus < RSpec::Rails::Matchers::BaseMatcher
243243

244244
# @return [Array<Symbol>] of status codes which represent a HTTP status
245245
# code "group"
246-
# @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse`
246+
# @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse`
247247
def self.valid_statuses
248248
[
249249
:error, :success, :missing,
@@ -313,7 +313,7 @@ def type_message
313313

314314
# @return [String] formatting the associated code(s) for the various
315315
# status code "groups"
316-
# @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse`
316+
# @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse`
317317
# @see https://github.com/rack/rack/blob/master/lib/rack/response.rb `Rack::Response`
318318
def type_codes
319319
# At the time of this commit the most recent version of
@@ -373,7 +373,7 @@ def type_codes
373373
# expect(response).to have_http_status(404)
374374
# expect(page).to have_http_status(:created)
375375
#
376-
# @see https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse`
376+
# @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse`
377377
# @see https://github.com/rack/rack/blob/master/lib/rack/utils.rb `Rack::Utils::SYMBOL_TO_STATUS_CODE`
378378
def have_http_status(target)
379379
raise ArgumentError, "Invalid HTTP status: nil" unless target

spec/rspec/rails/matchers/have_http_status_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def create_response(opts = {})
224224
# The error query is an alias for `server_error?`:
225225
#
226226
# - https://github.com/rails/rails/blob/ca200378/actionpack/lib/action_dispatch/testing/test_response.rb#L27
227-
# - https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb
227+
# - https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb
228228
#
229229
# `server_error?` is part of the Rack Helpers and is defined as:
230230
#
@@ -278,7 +278,7 @@ def create_response(opts = {})
278278
# The success query is an alias for `successful?`:
279279
#
280280
# - https://github.com/rails/rails/blob/ca200378/actionpack/lib/action_dispatch/testing/test_response.rb#L18
281-
# - https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb
281+
# - https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb
282282
#
283283
# `successful?` is part of the Rack Helpers and is defined as:
284284
#
@@ -336,7 +336,7 @@ def create_response(opts = {})
336336
# The missing query is an alias for `not_found?`:
337337
#
338338
# - https://github.com/rails/rails/blob/ca200378/actionpack/lib/action_dispatch/testing/test_response.rb#L21
339-
# - https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb
339+
# - https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb
340340
#
341341
# `not_found?` is part of the Rack Helpers and is defined as:
342342
#
@@ -395,7 +395,7 @@ def create_response(opts = {})
395395
# The redirect query is an alias for `redirection?`:
396396
#
397397
# - https://github.com/rails/rails/blob/ca200378/actionpack/lib/action_dispatch/testing/test_response.rb#L24
398-
# - https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/test_response.rb
398+
# - https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb
399399
#
400400
# `redirection?` is part of the Rack Helpers and is defined as:
401401
#

0 commit comments

Comments
 (0)