Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 203b3cd

Browse files
authored
Merge pull request #457 from rspec/remove-monkey-patching
Use globally unexposed DSL
2 parents a8202af + 88873d3 commit 203b3cd

12 files changed

+14
-14
lines changed

spec/rspec/support/comparable_version_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'rspec/support/comparable_version'
22

33
module RSpec::Support
4-
describe ComparableVersion do
4+
RSpec.describe ComparableVersion do
55
describe '#<=>' do
66
[
77
['1.2.3', '1.2.3', 0],

spec/rspec/support/directory_maker_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RSpec::Support.require_rspec_support("directory_maker")
44

55
module RSpec::Support
6-
describe DirectoryMaker do
6+
RSpec.describe DirectoryMaker do
77
shared_examples_for "an mkdir_p implementation" do
88
include_context "isolated directory"
99

spec/rspec/support/encoded_string_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'rspec/support/spec/string_matcher'
33

44
module RSpec::Support
5-
describe EncodedString do
5+
RSpec.describe EncodedString do
66
let(:utf8_encoding) { 'UTF-8' }
77

88
delegated_methods = String.instance_methods.map(&:to_s) & %w[eql? lines == encoding empty?]

spec/rspec/support/fuzzy_matcher_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module RSpec
44
module Support
5-
describe FuzzyMatcher, ".values_match?" do
5+
RSpec.describe FuzzyMatcher, ".values_match?" do
66
matcher :match_against do |actual|
77
match { |expected| FuzzyMatcher.values_match?(expected, actual) }
88
end

spec/rspec/support/method_signature_verifier_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module RSpec
55
module Support
6-
describe 'verifying methods' do
6+
RSpec.describe 'verifying methods' do
77
let(:signature) { MethodSignature.new(test_method) }
88

99
def valid_non_kw_args?(arity)

spec/rspec/support/object_formatter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module RSpec
55
module Support
6-
describe ObjectFormatter, ".format" do
6+
RSpec.describe ObjectFormatter, ".format" do
77
context 'with an array object containing other objects for which we have custom formatting' do
88
let(:time) { Time.utc(1969, 12, 31, 19, 01, 40, 101) }
99
let(:formatted_time) { ObjectFormatter.format(time) }

spec/rspec/support/recursive_const_methods_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module RSpec
44
module Support
5-
describe RecursiveConstMethods do
5+
RSpec.describe RecursiveConstMethods do
66
include described_class
77

88
module Foo

spec/rspec/support/ruby_features_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module RSpec
44
module Support
5-
describe OS do
5+
RSpec.describe OS do
66

77
describe ".windows?" do
88
%w[cygwin mswin mingw bccwin wince emx].each do |fragment|
@@ -33,7 +33,7 @@ module Support
3333
end
3434
end
3535

36-
describe Ruby do
36+
RSpec.describe Ruby do
3737
specify "jruby? reflects the state of RUBY_PLATFORM" do
3838
stub_const("RUBY_PLATFORM", "java")
3939
expect(Ruby).to be_jruby
@@ -58,7 +58,7 @@ module Support
5858
end
5959
end
6060

61-
describe RubyFeatures do
61+
RSpec.describe RubyFeatures do
6262
specify "#fork_supported? exists" do
6363
RubyFeatures.fork_supported?
6464
end

spec/rspec/support/spec/in_sub_process_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'tempfile'
22

3-
describe 'isolating code to a sub process' do
3+
RSpec.describe 'isolating code to a sub process' do
44
it 'isolates the block from the main process' do
55
in_sub_process do
66
module NotIsolated

spec/rspec/support/spec/stderr_splitter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tempfile'
33
require 'rspec/support/spec/in_sub_process'
44

5-
describe 'RSpec::Support::StdErrSplitter' do
5+
RSpec.describe 'RSpec::Support::StdErrSplitter' do
66
include RSpec::Support::InSubProcess
77

88
let(:splitter) { RSpec::Support::StdErrSplitter.new stderr }

spec/rspec/support/spec/with_isolated_std_err_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'rspec/support/spec'
22

3-
describe 'isolating a spec from the stderr splitter' do
3+
RSpec.describe 'isolating a spec from the stderr splitter' do
44
include RSpec::Support::WithIsolatedStdErr
55

66
it 'allows a spec to output a warning' do

spec/rspec/support/warnings_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "rspec/support/warnings"
22
require 'rspec/support/spec/shell_out'
33

4-
describe "rspec warnings and deprecations" do
4+
RSpec.describe "rspec warnings and deprecations" do
55
include RSpec::Support::ShellOut
66
let(:warning_object) do
77
Object.new.tap { |o| o.extend(RSpec::Support::Warnings) }

0 commit comments

Comments
 (0)