Module: RSpec
- Defined in:
- lib/rspec/core/version.rb,
lib/rspec/core.rb,
lib/rspec/core/let.rb,
lib/rspec/core/hooks.rb,
lib/rspec/core/world.rb,
lib/rspec/core/errors.rb,
lib/rspec/core/runner.rb,
lib/rspec/core/example.rb,
lib/rspec/core/pending.rb,
lib/rspec/core/subject.rb,
lib/rspec/core/metadata.rb,
lib/rspec/core/rake_task.rb,
lib/rspec/core/deprecation.rb,
lib/rspec/core/command_line.rb,
lib/rspec/core/ruby_project.rb,
lib/rspec/core/configuration.rb,
lib/rspec/core/example_group.rb,
lib/rspec/core/shared_context.rb,
lib/rspec/core/mocking/with_rr.rb,
lib/rspec/core/drb_command_line.rb,
lib/rspec/core/extensions/object.rb,
lib/rspec/core/formatters/helpers.rb,
lib/rspec/core/mocking/with_mocha.rb,
lib/rspec/core/mocking/with_rspec.rb,
lib/rspec/core/expecting/with_rspec.rb,
lib/rspec/core/shared_example_group.rb,
lib/rspec/core/configuration_options.rb,
lib/rspec/core/expecting/with_stdlib.rb,
lib/rspec/core/mocking/with_flexmock.rb,
lib/rspec/core/backward_compatibility.rb,
lib/rspec/core/formatters/base_formatter.rb,
lib/rspec/core/formatters/html_formatter.rb,
lib/rspec/core/command_line_configuration.rb,
lib/rspec/core/formatters/snippet_extractor.rb,
lib/rspec/core/formatters/progress_formatter.rb,
lib/rspec/core/formatters/base_text_formatter.rb,
lib/rspec/core/formatters/text_mate_formatter.rb,
lib/rspec/core/mocking/with_absolutely_nothing.rb,
lib/rspec/core/extensions/module_eval_with_args.rb,
lib/rspec/core/extensions/instance_eval_with_args.rb,
lib/rspec/core/formatters/documentation_formatter.rb
Overview
Defined Under Namespace
Modules: Core, Rake, Runner
Classes: HashWithDeprecationNotice
Constant Summary
collapse
- SharedContext =
Core::SharedContext
Class Method Summary
collapse
Class Method Details
.clear_remaining_example_groups ⇒ Object
59
60
61
|
# File 'lib/rspec/core.rb', line 59
def self.clear_remaining_example_groups
world.example_groups.clear
end
|
55
56
57
|
# File 'lib/rspec/core.rb', line 55
def self.configure
yield configuration if block_given?
end
|
.deprecate(method, alternate_method = nil, version = nil) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/rspec/core/deprecation.rb', line 4
def deprecate(method, alternate_method=nil, version=nil)
version_string = version ? "rspec-#{version}" : "a future version of RSpec"
message = <<-NOTICE
*****************************************************************
DEPRECATION WARNING: you are using deprecated behaviour that will
be removed from #{version_string}.
#{caller(0)[2]}
* #{method} is deprecated.
NOTICE
if alternate_method
message << <<-ADDITIONAL
* please use #{alternate_method} instead.
ADDITIONAL
end
message << "*****************************************************************"
warn_deprecation(message)
end
|
.wants_to_quit ⇒ Object
39
40
41
|
# File 'lib/rspec/core.rb', line 39
def self.wants_to_quit
world.wants_to_quit
end
|
.wants_to_quit=(maybe) ⇒ Object
43
44
45
|
# File 'lib/rspec/core.rb', line 43
def self.wants_to_quit=(maybe)
world.wants_to_quit=(maybe)
end
|
.warn_deprecation(message) ⇒ Object
27
28
29
|
# File 'lib/rspec/core/deprecation.rb', line 27
def warn_deprecation(message)
send :warn, message
end
|
47
48
49
|
# File 'lib/rspec/core.rb', line 47
def self.world
@world ||= RSpec::Core::World.new
end
|