Skip to content

Commit

Permalink
Fix some typos (#2996)
Browse files Browse the repository at this point in the history
* s/calcalator/calculator/

* s/Collecion/Collection/

* s/fowarding/forwarding/

* s/boundarries/boundaries/

* s/embarassing/embarrassing/

* s/cofigure/configure/

* s/noticable/noticeable/

* s/Fafter/after/

* s/exlusion/exclusion/

* s/similiar/similar/

* s/foramtted/formatted/

* s/willl/will/

* s/occured/occurred/

* s/examle/example/

* s/exaples/examples/

* s/spec_helpe/spec_helper/

* s/elasped/elapsed/

* s/progresss/progress/

* s/accesssed/accessed/

* s/availble/available/

* Update spec/rspec/core/formatters_spec.rb

* Update features/hooks/before_and_after_hooks.feature

Co-authored-by: Phil Pirozhkov <pirj@users.noreply.github.com>
  • Loading branch information
2 people authored and JonRowe committed Jan 7, 2023
1 parent 1d94593 commit 7f863d5
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ Failures:
got: nil
(compared using ==)
# ./spec/calcalator_spec.rb:6:in `block (3 levels) in <top (required)>'
# ./spec/calculator_spec.rb:6:in `block (3 levels) in <top (required)>'
Finished in 0.00131 seconds (files took 0.10968 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/calcalator_spec.rb:5 # Calculator#add returns the sum of its arguments
rspec ./spec/calculator_spec.rb:5 # Calculator#add returns the sum of its arguments
```

Implement the simplest solution, by changing the definition of `Calculator#add` to:
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/allocations/1000_groups_1_example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
- 10K arrays
- 10K sets
- 5K FilterableItemRepository
- 5K HookCollecion
- 5K HookCollection

class_plus count
--------------------------------------- -----
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/capture_block_vs_yield.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def call_block_n_times(n, &block)
a high constant cost, taking about 5x longer than a single `yield`
(even if the block is never used!).

However, fowarding a captured block can be faster than using `yield`
However, forwarding a captured block can be faster than using `yield`
if the block is used many times (the breakeven point is at about 20-25
invocations), so it appears that he per-invocation cost of `yield`
is higher than that of a captured-and-forwarded block.
Expand Down
2 changes: 1 addition & 1 deletion features/command_line/example_matches_name_option.feature
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Feature: `--example-matches` option
| nested group second example in nested group |

# https://regex101.com/r/RABd8Q/2
Scenario: Match only matching regex with word boundarries
Scenario: Match only matching regex with word boundaries
When I run `rspec . --example-matches "nested[^_]" --format d`
Then the examples should all pass
And the output should contain all of these:
Expand Down
2 changes: 1 addition & 1 deletion features/command_line/require_option.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: `--require` option
"""
And a file named "spec/example_spec.rb" with:
"""ruby
RSpec.describe "an embarassing situation" do
RSpec.describe "an embarrassing situation" do
it "happens to everyone" do
end
end
Expand Down
2 changes: 1 addition & 1 deletion features/configuration/custom_settings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Feature: custom settings
end
RSpec.describe "custom setting" do
it "returns the value set in the last cofigure block to get eval'd" do
it "returns the value set in the last configure block to get eval'd" do
expect(RSpec.configuration.custom_setting).to be(true)
end
Expand Down
2 changes: 1 addition & 1 deletion features/example_groups/shared_examples.feature
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Feature: shared examples
`rspec-rails`. However, in order to keep your test suite boot time down,
it's a good idea to not autorequire all files in a directory like this.
When running only one spec file, loading unneeded dependencies or performing
unneeded setup can have a significant, noticable effect on how long it takes
unneeded setup can have a significant, noticeable effect on how long it takes
before the first example runs.

3. When all of the groups that include the shared group reside in the same file,
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/core/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def backtrace_exclusion_patterns
end

# Set regular expressions used to exclude lines in backtrace.
# @param patterns [Array<Regexp>] set backtrace_formatter exlusion_patterns
# @param patterns [Array<Regexp>] set backtrace_formatter exclusion_patterns
def backtrace_exclusion_patterns=(patterns)
@backtrace_formatter.exclusion_patterns = patterns
end
Expand Down Expand Up @@ -1820,7 +1820,7 @@ def raise_errors_for_deprecations!
# by not setting `mock_with` or `expect_with` to anything else).
#
# @note If the user uses this options with `mock_with :mocha`
# (or similiar) they will still have monkey patching active
# (or similar) they will still have monkey patching active
# in their test environment from mocha.
#
# @example
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/core/example_status_persister.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def statuses_from_this_run
# were loaded but not executed (due to filtering, `--fail-fast`
# or whatever) should have a `:status` of `UNKNOWN_STATUS`.
#
# This willl produce a new list that:
# This will produce a new list that:
# - Will be missing examples from previous runs that we know for sure
# no longer exist.
# - Will have the latest known status for any examples that either
Expand Down Expand Up @@ -164,7 +164,7 @@ def formatted_header_rows
end

def formatted_value_rows
@foramtted_value_rows ||= rows.map do |row|
@formatted_value_rows ||= rows.map do |row|
formatted_row_from(row)
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/core/formatters/html_snippet_extractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def self.convert(code)
#
# @param backtrace [String] the backtrace from a test failure
# @return [String] highlighted code snippet indicating where the test
# failure occured
# failure occurred
#
# @see #post_process
def snippet(backtrace)
Expand Down Expand Up @@ -103,7 +103,7 @@ def lines_around(file, line)
#
# @param highlighted [String] syntax-highlighted snippet surrounding the
# offending line of code
# @param offending_line [Fixnum] line where failure occured
# @param offending_line [Fixnum] line where failure occurred
# @return [String] completed snippet
def post_process(highlighted, offending_line)
new_lines = []
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/core/metadata_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module FilterableItemRepository
#
# This is ideal for use by a example or example group, which may
# be updated multiple times with globally configured hooks, etc,
# but will not be queried frequently by other examples or examle
# but will not be queried frequently by other examples or example
# groups.
# @private
class UpdateOptimized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def spec_files_with_failures
end

context "when `example_status_persistence_file_path` is configured" do
it 'returns a memoized array of unique spec files that contain failed exaples' do
it 'returns a memoized array of unique spec files that contain failed examples' do
simulate_persisted_examples(
{ :example_id => "./spec_1.rb[1:1]", :status => "failed" },
{ :example_id => "./spec_1.rb[1:2]", :status => "failed" },
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/configuration_options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

{ "pattern" => :pattern, "exclude-pattern" => :exclude_pattern }.each do |flag, attr|
it "sets #{attr} before `requires` so users can check `files_to_run` in a `spec_helper` loaded by `--require`" do
opts = config_options_object(*%W[--require spec_helpe --#{flag} **/*.spec])
opts = config_options_object(*%W[--require spec_helper --#{flag} **/*.spec])
expect(config).to receive(:force).with({attr => '**/*.spec'}).ordered
expect(config).to receive(:requires=).ordered
opts.configure(config)
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/formatters/helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
expect(helper.format_seconds(50.330340)).to eq("50.33")
end

it "returns human friendly elasped time" do
it "returns human friendly elapsed time" do
expect(helper.format_seconds(50.1)).to eq("50.1")
expect(helper.format_seconds(5)).to eq("5")
expect(helper.format_seconds(5.0)).to eq("5")
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/formatters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module RSpec::Core::Formatters
end

it "raises ArgumentError if formatter is unknown" do
expect { loader.add :progresss, output }.to raise_error(ArgumentError)
expect { loader.add :nonexistent, output }.to raise_error(ArgumentError)
end

context "with a 2nd arg defining the output" do
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/memoized_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def not_ok?; false; end
end
end

specify 'memoized blocks prevent other threads from accessing, even when it is accesssed in a superclass' do
specify 'memoized blocks prevent other threads from accessing, even when it is accessed in a superclass' do
describe_successfully do
let!(:order) { ThreadOrder.new }
after { order.apocalypse! :join }
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# of files in `support/fake_libs` that substitute for the real things when
# we put that directory on the load path. Here's the list:
#
# * coderay -- loaded by the HTML formatter if availble for syntax highlighting.
# * coderay -- loaded by the HTML formatter if available for syntax highlighting.
# * drb -- loaded when `--drb` is used. Loads other stdlibs (socket, thread, fcntl).
# * erb -- loaded by `ConfigurationOptions` so `.rspec` can use ERB. Loads other stdlibs (strscan, cgi/util).
# * flexmock -- loaded by our Flexmock mocking adapter.
Expand Down

0 comments on commit 7f863d5

Please sign in to comment.