rspec-core 3.0.4 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +67 -0
- data/lib/rspec/core.rb +3 -1
- data/lib/rspec/core/backtrace_formatter.rb +13 -10
- data/lib/rspec/core/configuration.rb +123 -57
- data/lib/rspec/core/configuration_options.rb +12 -12
- data/lib/rspec/core/drb.rb +11 -11
- data/lib/rspec/core/dsl.rb +0 -1
- data/lib/rspec/core/example.rb +39 -12
- data/lib/rspec/core/example_group.rb +31 -98
- data/lib/rspec/core/filter_manager.rb +16 -17
- data/lib/rspec/core/formatters.rb +14 -13
- data/lib/rspec/core/formatters/base_formatter.rb +8 -113
- data/lib/rspec/core/formatters/base_text_formatter.rb +3 -5
- data/lib/rspec/core/formatters/console_codes.rb +1 -2
- data/lib/rspec/core/formatters/deprecation_formatter.rb +2 -3
- data/lib/rspec/core/formatters/documentation_formatter.rb +3 -4
- data/lib/rspec/core/formatters/helpers.rb +5 -6
- data/lib/rspec/core/formatters/html_formatter.rb +20 -19
- data/lib/rspec/core/formatters/html_printer.rb +6 -5
- data/lib/rspec/core/formatters/json_formatter.rb +3 -2
- data/lib/rspec/core/formatters/profile_formatter.rb +0 -2
- data/lib/rspec/core/formatters/progress_formatter.rb +4 -4
- data/lib/rspec/core/formatters/protocol.rb +163 -0
- data/lib/rspec/core/formatters/snippet_extractor.rb +7 -6
- data/lib/rspec/core/hooks.rb +25 -10
- data/lib/rspec/core/memoized_helpers.rb +7 -5
- data/lib/rspec/core/metadata.rb +29 -30
- data/lib/rspec/core/metadata_filter.rb +66 -66
- data/lib/rspec/core/minitest_assertions_adapter.rb +1 -1
- data/lib/rspec/core/mocking_adapters/flexmock.rb +3 -1
- data/lib/rspec/core/mocking_adapters/mocha.rb +3 -1
- data/lib/rspec/core/mocking_adapters/null.rb +2 -0
- data/lib/rspec/core/mocking_adapters/rr.rb +3 -1
- data/lib/rspec/core/mocking_adapters/rspec.rb +3 -1
- data/lib/rspec/core/notifications.rb +36 -29
- data/lib/rspec/core/option_parser.rb +29 -25
- data/lib/rspec/core/ordering.rb +8 -9
- data/lib/rspec/core/pending.rb +6 -8
- data/lib/rspec/core/project_initializer.rb +4 -2
- data/lib/rspec/core/project_initializer/.rspec +0 -1
- data/lib/rspec/core/project_initializer/spec/spec_helper.rb +37 -26
- data/lib/rspec/core/rake_task.rb +37 -19
- data/lib/rspec/core/reporter.rb +13 -16
- data/lib/rspec/core/ruby_project.rb +2 -2
- data/lib/rspec/core/runner.rb +11 -14
- data/lib/rspec/core/shared_example_group.rb +14 -13
- data/lib/rspec/core/test_unit_assertions_adapter.rb +1 -1
- data/lib/rspec/core/version.rb +1 -1
- data/lib/rspec/core/warnings.rb +4 -4
- data/lib/rspec/core/world.rb +22 -24
- metadata +6 -5
- metadata.gz.sig +0 -0
data/lib/rspec/core/version.rb
CHANGED
data/lib/rspec/core/warnings.rb
CHANGED
@@ -7,7 +7,7 @@ module RSpec
|
|
7
7
|
# @private
|
8
8
|
#
|
9
9
|
# Used internally to print deprecation warnings
|
10
|
-
def deprecate(deprecated, data
|
10
|
+
def deprecate(deprecated, data={})
|
11
11
|
RSpec.configuration.reporter.deprecation(
|
12
12
|
{
|
13
13
|
:deprecated => deprecated,
|
@@ -19,12 +19,12 @@ module RSpec
|
|
19
19
|
# @private
|
20
20
|
#
|
21
21
|
# Used internally to print deprecation warnings
|
22
|
-
def warn_deprecation(message, opts
|
23
|
-
RSpec.configuration.reporter.deprecation opts.merge(
|
22
|
+
def warn_deprecation(message, opts={})
|
23
|
+
RSpec.configuration.reporter.deprecation opts.merge(:message => message)
|
24
24
|
end
|
25
25
|
|
26
26
|
# @private
|
27
|
-
def warn_with(message, options
|
27
|
+
def warn_with(message, options={})
|
28
28
|
if options[:use_spec_location_as_call_site]
|
29
29
|
message += "." unless message.end_with?(".")
|
30
30
|
|
data/lib/rspec/core/world.rb
CHANGED
@@ -4,7 +4,6 @@ module RSpec
|
|
4
4
|
#
|
5
5
|
# Internal container for global non-configuration data
|
6
6
|
class World
|
7
|
-
|
8
7
|
include RSpec::Core::Hooks
|
9
8
|
|
10
9
|
# @private
|
@@ -16,14 +15,14 @@ module RSpec
|
|
16
15
|
def initialize(configuration=RSpec.configuration)
|
17
16
|
@configuration = configuration
|
18
17
|
@example_groups = []
|
19
|
-
@filtered_examples = Hash.new
|
18
|
+
@filtered_examples = Hash.new do |hash, group|
|
20
19
|
hash[group] = begin
|
21
20
|
examples = group.examples.dup
|
22
21
|
examples = filter_manager.prune(examples)
|
23
22
|
examples.uniq!
|
24
23
|
examples
|
25
24
|
end
|
26
|
-
|
25
|
+
end
|
27
26
|
end
|
28
27
|
|
29
28
|
# @private
|
@@ -90,8 +89,8 @@ module RSpec
|
|
90
89
|
#
|
91
90
|
# Get count of examples to be run
|
92
91
|
def example_count(groups=example_groups)
|
93
|
-
FlatMap.flat_map(groups) {|g| g.descendants}.
|
94
|
-
inject(0) {|
|
92
|
+
FlatMap.flat_map(groups) { |g| g.descendants }.
|
93
|
+
inject(0) { |a, e| a + e.filtered_examples.size }
|
95
94
|
end
|
96
95
|
|
97
96
|
# @api private
|
@@ -131,19 +130,19 @@ module RSpec
|
|
131
130
|
inclusion_filter.clear
|
132
131
|
end
|
133
132
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
reporter.message(message)
|
144
|
-
elsif inclusion_filter.empty?
|
145
|
-
reporter.message(everything_filtered_message)
|
133
|
+
return unless example_count.zero?
|
134
|
+
|
135
|
+
example_groups.clear
|
136
|
+
if filter_manager.empty?
|
137
|
+
reporter.message("No examples found.")
|
138
|
+
elsif exclusion_filter.empty?
|
139
|
+
message = everything_filtered_message
|
140
|
+
if @configuration.run_all_when_everything_filtered?
|
141
|
+
message << "; ignoring #{inclusion_filter.description}"
|
146
142
|
end
|
143
|
+
reporter.message(message)
|
144
|
+
elsif inclusion_filter.empty?
|
145
|
+
reporter.message(everything_filtered_message)
|
147
146
|
end
|
148
147
|
end
|
149
148
|
|
@@ -156,18 +155,18 @@ module RSpec
|
|
156
155
|
#
|
157
156
|
# Add inclusion filters to announcement message
|
158
157
|
def announce_inclusion_filter(announcements)
|
159
|
-
|
160
|
-
|
161
|
-
|
158
|
+
return if inclusion_filter.empty?
|
159
|
+
|
160
|
+
announcements << "include #{inclusion_filter.description}"
|
162
161
|
end
|
163
162
|
|
164
163
|
# @api private
|
165
164
|
#
|
166
165
|
# Add exclusion filters to announcement message
|
167
166
|
def announce_exclusion_filter(announcements)
|
168
|
-
|
169
|
-
|
170
|
-
|
167
|
+
return if exclusion_filter.empty?
|
168
|
+
|
169
|
+
announcements << "exclude #{exclusion_filter.description}"
|
171
170
|
end
|
172
171
|
|
173
172
|
private
|
@@ -177,7 +176,6 @@ module RSpec
|
|
177
176
|
lines + g.declaration_line_numbers
|
178
177
|
end
|
179
178
|
end
|
180
|
-
|
181
179
|
end
|
182
180
|
end
|
183
181
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
|
35
35
|
muA=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2014-
|
37
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: rspec-support
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 3.
|
45
|
+
version: 3.1.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 3.
|
52
|
+
version: 3.1.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- lib/rspec/core/formatters/json_formatter.rb
|
214
214
|
- lib/rspec/core/formatters/profile_formatter.rb
|
215
215
|
- lib/rspec/core/formatters/progress_formatter.rb
|
216
|
+
- lib/rspec/core/formatters/protocol.rb
|
216
217
|
- lib/rspec/core/formatters/snippet_extractor.rb
|
217
218
|
- lib/rspec/core/hooks.rb
|
218
219
|
- lib/rspec/core/memoized_helpers.rb
|
@@ -265,6 +266,6 @@ rubyforge_project: rspec
|
|
265
266
|
rubygems_version: 2.2.2
|
266
267
|
signing_key:
|
267
268
|
specification_version: 4
|
268
|
-
summary: rspec-core-3.0
|
269
|
+
summary: rspec-core-3.1.0
|
269
270
|
test_files: []
|
270
271
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|