| 1 |
# grep -v -f <this file> doesn't work properly when empty, so this line is here. |
| 2 |
|
| 3 |
# The `alias_method` calls below are only executed at file load time |
| 4 |
# (when the method cache will be busted by defining methods anyway). |
| 5 |
lib/rspec/core/configuration.rb: alias_method alias_name, name |
| 6 |
lib/rspec/core/configuration.rb: alias_method "#{alias_name}=", "#{name}=" |
| 7 |
lib/rspec/core/configuration.rb: names.each {|name| alias_method "#{name}?", name} |
| 8 |
lib/rspec/core/configuration.rb: alias_method :formatter=, :add_formatter |
| 9 |
lib/rspec/core/configuration.rb: alias_method :alias_it_should_behave_like_to, :alias_it_behaves_like_to |
| 10 |
lib/rspec/core/configuration.rb: alias_method :filter_run, :filter_run_including |
| 11 |
lib/rspec/core/configuration.rb: alias_method :filter=, :inclusion_filter= |
| 12 |
lib/rspec/core/configuration.rb: alias_method :filter, :inclusion_filter |
| 13 |
lib/rspec/core/example.rb: alias_method :pending?, :pending |
| 14 |
lib/rspec/core/example_group.rb: alias_method :display_name, :description |
| 15 |
lib/rspec/core/example_group.rb: alias_method :describes, :described_class |
| 16 |
lib/rspec/core/example_group.rb: # Works like `alias_method :name, :example` with the added benefit of |
| 17 |
lib/rspec/core/example_group.rb: # Works like `alias_method :name, :it_behaves_like` with the added |
| 18 |
lib/rspec/core/example_group.rb: alias_method :context, :describe |
| 19 |
lib/rspec/core/hooks.rb: alias_method :append_before, :before |
| 20 |
lib/rspec/core/hooks.rb: alias_method :prepend_after, :after |
| 21 |
lib/rspec/core/shared_example_group.rb: alias_method :shared_context, :shared_examples |
| 22 |
lib/rspec/core/shared_example_group.rb: alias_method :share_examples_for, :shared_examples |
| 23 |
lib/rspec/core/shared_example_group.rb: alias_method :shared_examples_for, :shared_examples |
| 24 |
lib/rspec/core/shared_example_group.rb: alias_method :shared_context, :shared_examples |
| 25 |
lib/rspec/core/shared_example_group.rb: alias_method :share_examples_for, :shared_examples |
| 26 |
lib/rspec/core/shared_example_group.rb: alias_method :shared_examples_for, :shared_examples |
| 27 |
lib/rspec/core/example_group.rb: alias_method :describe, :example_group |
| 28 |
lib/rspec/core/example_group.rb: alias_method :context, :example_group |
| 29 |
|
| 30 |
# The `alias_method` calls below happen when users define a named let. |
| 31 |
# It happens at spec definition time, not spec run time. |
| 32 |
lib/rspec/core/memoized_helpers.rb: alias_method :subject, name |
| 33 |
|
| 34 |
# These `const_set` calls happen at spec definition time, |
| 35 |
# not at spec run time, so they are OK. |
| 36 |
lib/rspec/core/example_group.rb: const_scope.const_set(name, group) |
| 37 |
lib/rspec/core/memoized_helpers.rb: example_group.const_set(:NamedSubjectPreventSuper, self) |
| 38 |
lib/rspec/core/memoized_helpers.rb: example_group.const_set(:LetDefinitions, mod) |
| 39 |
|
| 40 |
# These mentions of `extend` get executed at spec definition time |
| 41 |
# (unless the user changes their RSpec config at spec run time, but |
| 42 |
# there's no way to work around that). |
| 43 |
lib/rspec/core/configuration.rb: def extend(mod, \*filters) |
| 44 |
lib/rspec/core/configuration.rb: include_or_extend_modules << \[:extend, mod, Metadata.build_hash_from(filters)\] |
| 45 |
lib/rspec/core/configuration.rb: host.extend(mod) unless host.singleton_class < mod |
| 46 |
lib/rspec/core/configuration.rb: host.extend(mod) unless (class << host; self; end).included_modules.include?(mod) |
| 47 |
lib/rspec/core/configuration.rb: extend RSpec::SharedContext |
| 48 |
lib/rspec/core/dsl.rb:extend RSpec::Core::DSL |
| 49 |
lib/rspec/core/example_group.rb: extend Hooks |
| 50 |
lib/rspec/core/example_group.rb: extend SharedExampleGroup |
| 51 |
lib/rspec/core/memoized_helpers.rb: mod.extend(ClassMethods) |
| 52 |
lib/rspec/core/shared_example_group.rb:extend RSpec::Core::SharedExampleGroup::TopLevelDSL |
| 53 |
|
| 54 |
# This use of `extend` only happens on 1.8.7, when a shared example group |
| 55 |
# is defined (to provide the Proc#source_location method on the provided |
| 56 |
# block). It should only happen at spec definition time (unless users are |
| 57 |
# defining shared example groups at spec run time). |
| 58 |
lib/rspec/core/shared_example_group.rb: block.extend Module.new { |
| 59 |
|
| 60 |
# This happens when an example group is defined, not at spec run time. |
| 61 |
lib/rspec/core/example_group.rb: subclass = Class.new(parent) |
| 62 |
|
| 63 |
# This happens at file load time. |
| 64 |
lib/rspec/core/formatters/deprecation_formatter.rb: DeprecationError = Class.new(StandardError) |
| 65 |
|
| 66 |
# This enables / disable monkey patching and only happens on demand |
| 67 |
lib/rspec/core/dsl.rb: change_global_dsl { undef_method method_name } |
| 68 |
lib/rspec/core/shared_example_group.rb: undef shared_examples |
| 69 |
lib/rspec/core/shared_example_group.rb: undef shared_context |
| 70 |
lib/rspec/core/shared_example_group.rb: undef share_examples_for |
| 71 |
lib/rspec/core/shared_example_group.rb: undef shared_examples_for |
| 72 |
lib/rspec/core/shared_example_group.rb: undef shared_example_groups |