dchelimsky-rspec 1.1.12 → 1.1.99.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +35 -0
- data/License.txt +1 -1
- data/Manifest.txt +22 -73
- data/README.txt +2 -2
- data/Rakefile +32 -7
- data/TODO.txt +9 -4
- data/bin/spec +1 -1
- data/cucumber.yml +2 -0
- data/examples/failing/spec_helper.rb +1 -1
- data/examples/passing/filtered_formatter.rb +18 -0
- data/examples/passing/filtered_formatter_example.rb +31 -0
- data/examples/passing/spec_helper.rb +1 -1
- data/examples/ruby1.9.compatibility/access_to_constants_spec.rb +17 -18
- data/features/before_and_after_blocks/before_and_after_blocks.feature +4 -4
- data/features/example_groups/autogenerated_docstrings.feature +2 -2
- data/features/example_groups/example_group_with_should_methods.feature +1 -1
- data/features/example_groups/nested_groups.feature +1 -1
- data/features/interop/examples_and_tests_together.feature +1 -1
- data/features/interop/test_but_not_test_unit.feature +1 -1
- data/features/interop/test_case_with_should_methods.feature +1 -1
- data/features/mock_framework_integration/use_flexmock.feature +22 -4
- data/features/mock_framework_integration/use_mocha.feature +27 -0
- data/features/mock_framework_integration/use_rr.feature +27 -0
- data/features/step_definitions/running_rspec.rb +5 -3
- data/features/support/env.rb +1 -1
- data/features-pending/cli/conditional_exclusion.feature +39 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/flexmock.rb +1 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/mocha.rb +1 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rr.rb +1 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rspec.rb +0 -1
- data/lib/spec/autorun.rb +3 -0
- data/lib/spec/example/before_and_after_hooks.rb +5 -20
- data/lib/spec/example/example_description.rb +15 -0
- data/lib/spec/example/example_group.rb +0 -15
- data/lib/spec/example/example_group_factory.rb +34 -46
- data/lib/spec/example/example_group_hierarchy.rb +53 -0
- data/lib/spec/example/example_group_methods.rb +96 -211
- data/lib/spec/example/example_methods.rb +62 -81
- data/lib/spec/example/module_reopening_fix.rb +23 -1
- data/lib/spec/example/predicate_matchers.rb +47 -0
- data/lib/spec/example/subject.rb +91 -0
- data/lib/spec/example.rb +4 -0
- data/lib/spec/expectations/extensions.rb +0 -1
- data/lib/spec/expectations/handler.rb +6 -1
- data/lib/spec/expectations.rb +1 -1
- data/lib/spec/interop/test/unit/testcase.rb +5 -22
- data/lib/spec/interop/test.rb +1 -0
- data/lib/spec/matchers/be.rb +2 -7
- data/lib/spec/matchers/be_close.rb +20 -5
- data/lib/spec/matchers/change.rb +5 -3
- data/lib/spec/matchers/eql.rb +24 -6
- data/lib/spec/matchers/equal.rb +24 -6
- data/lib/spec/matchers/exist.rb +21 -5
- data/lib/spec/matchers/generated_descriptions.rb +2 -2
- data/lib/spec/matchers/has.rb +28 -11
- data/lib/spec/matchers/match.rb +25 -7
- data/lib/spec/matchers/match_array.rb +1 -1
- data/lib/spec/matchers/method_missing.rb +2 -2
- data/lib/spec/matchers/operator_matcher.rb +12 -5
- data/lib/spec/matchers/raise_error.rb +1 -1
- data/lib/spec/matchers/respond_to.rb +1 -1
- data/lib/spec/matchers/satisfy.rb +5 -5
- data/lib/spec/matchers/throw_symbol.rb +1 -3
- data/lib/spec/mocks/argument_expectation.rb +1 -1
- data/lib/spec/mocks/argument_matchers.rb +233 -0
- data/lib/spec/mocks/error_generator.rb +2 -6
- data/lib/spec/mocks/message_expectation.rb +3 -11
- data/lib/spec/mocks/mock.rb +1 -1
- data/lib/spec/mocks/proxy.rb +5 -1
- data/lib/spec/runner/configuration.rb +3 -3
- data/lib/spec/runner/drb_command_line.rb +2 -1
- data/lib/spec/runner/example_group_runner.rb +2 -1
- data/lib/spec/runner/formatter/base_text_formatter.rb +28 -17
- data/lib/spec/runner/formatter/failing_example_groups_formatter.rb +3 -5
- data/lib/spec/runner/formatter/html_formatter.rb +2 -3
- data/lib/spec/runner/formatter/nested_text_formatter.rb +7 -25
- data/lib/spec/runner/formatter/progress_bar_formatter.rb +1 -1
- data/lib/spec/runner/formatter/specdoc_formatter.rb +1 -7
- data/lib/spec/runner/heckle_runner_unsupported.rb +1 -1
- data/lib/spec/runner/option_parser.rb +16 -19
- data/lib/spec/runner/options.rb +28 -26
- data/lib/spec/runner/reporter.rb +8 -9
- data/lib/spec/runner.rb +6 -28
- data/lib/spec/test/unit.rb +10 -0
- data/lib/spec/version.rb +2 -2
- data/{features/support → resources}/helpers/cmdline.rb +2 -2
- data/resources/rake/verify_rcov.rake +1 -1
- data/resources/spec/example_group_with_should_methods.rb +1 -1
- data/resources/spec/simple_spec.rb +1 -1
- data/resources/test/spec_and_test_together.rb +2 -3
- data/resources/test/spec_including_test_but_not_unit.rb +1 -1
- data/resources/test/test_case_with_should_methods.rb +2 -3
- data/rspec.gemspec +5 -5
- data/spec/spec/dsl/main_spec.rb +3 -3
- data/spec/spec/example/example_group_class_definition_spec.rb +11 -14
- data/spec/spec/example/example_group_factory_spec.rb +31 -44
- data/spec/spec/example/example_group_methods_spec.rb +86 -52
- data/spec/spec/example/example_group_spec.rb +16 -75
- data/spec/spec/example/example_matcher_spec.rb +10 -10
- data/spec/spec/example/example_methods_spec.rb +101 -241
- data/spec/spec/example/nested_example_group_spec.rb +2 -2
- data/spec/spec/example/pending_module_spec.rb +1 -1
- data/spec/spec/example/shared_example_group_spec.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_that_fails.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_that_passes.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_with_errors.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +2 -2
- data/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +2 -2
- data/spec/spec/matchers/change_spec.rb +8 -0
- data/spec/spec/matchers/exist_spec.rb +8 -4
- data/spec/spec/matchers/handler_spec.rb +8 -1
- data/spec/spec/matchers/matcher_methods_spec.rb +1 -1
- data/spec/spec/mocks/{bug_report_496.rb → bug_report_496_spec.rb} +0 -0
- data/spec/spec/mocks/failing_argument_matchers_spec.rb +95 -0
- data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
- data/spec/spec/mocks/passing_argument_matchers_spec.rb +145 -0
- data/spec/spec/runner/configuration_spec.rb +12 -12
- data/spec/spec/runner/formatter/base_text_formatter_spec.rb +72 -1
- data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +8 -8
- data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +4 -4
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +8 -8
- data/spec/spec/runner/formatter/html_formatted-1.8.7.html +38 -26
- data/spec/spec/runner/formatter/html_formatted-1.9.1.html +61 -53
- data/spec/spec/runner/formatter/html_formatter_spec.rb +100 -48
- data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +20 -34
- data/spec/spec/runner/formatter/profile_formatter_spec.rb +1 -1
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +8 -6
- data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +6 -6
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +20 -20
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +38 -26
- data/spec/spec/runner/formatter/{spec_mate_formatter_spec.rb → text_mate_formatter_spec.rb} +10 -8
- data/spec/spec/runner/heckle_runner_spec.rb +1 -1
- data/spec/spec/runner/option_parser_spec.rb +15 -13
- data/spec/spec/runner/options_spec.rb +34 -0
- data/spec/spec/runner/reporter_spec.rb +65 -61
- data/spec/spec/runner/spec_drb.opts +1 -0
- data/spec/spec/runner_spec.rb +7 -5
- data/spec/spec_helper.rb +23 -0
- metadata +25 -76
- data/examples/passing/legacy_spec.rb +0 -11
- data/features/support/helpers/story_helper.rb +0 -13
- data/lib/spec/expectations/extensions/string_and_symbol.rb +0 -17
- data/resources/spec/spec_with_flexmock.rb +0 -19
- data/spec/spec/spec_spec.rb +0 -21
@@ -46,7 +46,7 @@ module Spec
|
|
46
46
|
"not specified. The --format option may be specified several times",
|
47
47
|
"if you want several outputs",
|
48
48
|
" ",
|
49
|
-
"Builtin formats
|
49
|
+
"Builtin formats:",
|
50
50
|
"progress|p : Text-based progress bar",
|
51
51
|
"profile|o : Text-based progress bar with profiling of 10 slowest examples",
|
52
52
|
"specdoc|s : Code example doc strings",
|
@@ -55,11 +55,6 @@ module Spec
|
|
55
55
|
"failing_examples|e : Write all failing examples - input for --example",
|
56
56
|
"failing_example_groups|g : Write all failing example groups - input for --example",
|
57
57
|
" ",
|
58
|
-
"Builtin formats for stories:",
|
59
|
-
"plain|p : Plain Text",
|
60
|
-
"html|h : A nice HTML report",
|
61
|
-
"progress|r : Text progress",
|
62
|
-
" ",
|
63
58
|
"FORMAT can also be the name of a custom formatter class",
|
64
59
|
"(in which case you should also specify --require to load it)"],
|
65
60
|
:require => ["-r", "--require FILE", "Require FILE before running specs",
|
@@ -112,7 +107,7 @@ module Spec
|
|
112
107
|
on(*OPTIONS[:timeout]) {|timeout| @options.timeout = timeout.to_f}
|
113
108
|
on(*OPTIONS[:heckle]) {|heckle| @options.load_heckle_runner(heckle)}
|
114
109
|
on(*OPTIONS[:dry_run]) {@options.dry_run = true}
|
115
|
-
on(*OPTIONS[:options_file]) {|options_file|
|
110
|
+
on(*OPTIONS[:options_file]) {|options_file|}
|
116
111
|
on(*OPTIONS[:generate_options]) {|options_file|}
|
117
112
|
on(*OPTIONS[:runner]) {|runner| @options.user_input_for_runner = runner}
|
118
113
|
on(*OPTIONS[:drb]) {}
|
@@ -122,9 +117,13 @@ module Spec
|
|
122
117
|
|
123
118
|
def order!(argv, &blk)
|
124
119
|
@argv = argv.dup
|
125
|
-
@argv = (@argv.empty?
|
120
|
+
@argv = (@argv.empty? & self.class.spec_command?) ? ['--help'] : @argv
|
121
|
+
|
122
|
+
# Parse options file first
|
123
|
+
parse_file_options(:options_file, :parse_options_file)
|
124
|
+
|
126
125
|
@options.argv = @argv.dup
|
127
|
-
return if
|
126
|
+
return if parse_file_options(:generate_options, :write_generated_options)
|
128
127
|
return if parse_drb
|
129
128
|
|
130
129
|
super(@argv) do |file|
|
@@ -145,16 +144,14 @@ module Spec
|
|
145
144
|
def parse_options_file(options_file)
|
146
145
|
option_file_args = IO.readlines(options_file).map {|l| l.chomp.split " "}.flatten
|
147
146
|
@argv.push(*option_file_args)
|
148
|
-
# TODO - this is a brute force solution to http://rspec.lighthouseapp.com/projects/5645/tickets/293.
|
149
|
-
# Let's look for a cleaner way. Might not be one. But let's look. If not, perhaps
|
150
|
-
# this can be moved to a different method to indicate the special handling for drb?
|
151
|
-
parse_drb(@argv)
|
152
147
|
end
|
153
148
|
|
154
|
-
def
|
155
|
-
# Remove the
|
149
|
+
def parse_file_options(option_name, action)
|
150
|
+
# Remove the file option and the argument before handling the file
|
156
151
|
options_file = nil
|
157
|
-
[
|
152
|
+
options_list = OPTIONS[option_name][0..1]
|
153
|
+
options_list[1].gsub!(" PATH", "")
|
154
|
+
options_list.each do |option|
|
158
155
|
if index = @argv.index(option)
|
159
156
|
@argv.delete_at(index)
|
160
157
|
options_file = @argv.delete_at(index)
|
@@ -162,7 +159,7 @@ module Spec
|
|
162
159
|
end
|
163
160
|
|
164
161
|
if options_file
|
165
|
-
|
162
|
+
send(action, options_file)
|
166
163
|
return true
|
167
164
|
else
|
168
165
|
return false
|
@@ -178,8 +175,8 @@ module Spec
|
|
178
175
|
@options.examples_should_not_be_run
|
179
176
|
end
|
180
177
|
|
181
|
-
def parse_drb
|
182
|
-
argv
|
178
|
+
def parse_drb
|
179
|
+
argv = @options.argv
|
183
180
|
is_drb = false
|
184
181
|
is_drb ||= argv.delete(OPTIONS[:drb][0])
|
185
182
|
is_drb ||= argv.delete(OPTIONS[:drb][1])
|
data/lib/spec/runner/options.rb
CHANGED
@@ -23,16 +23,6 @@ module Spec
|
|
23
23
|
'textmate' => ['spec/runner/formatter/text_mate_formatter', 'Formatter::TextMateFormatter']
|
24
24
|
}
|
25
25
|
|
26
|
-
STORY_FORMATTERS = {
|
27
|
-
'plain' => ['spec/runner/formatter/story/plain_text_formatter', 'Formatter::Story::PlainTextFormatter'],
|
28
|
-
'p' => ['spec/runner/formatter/story/plain_text_formatter', 'Formatter::Story::PlainTextFormatter'],
|
29
|
-
'html' => ['spec/runner/formatter/story/html_formatter', 'Formatter::Story::HtmlFormatter'],
|
30
|
-
'h' => ['spec/runner/formatter/story/html_formatter', 'Formatter::Story::HtmlFormatter'],
|
31
|
-
'progress' => ['spec/runner/formatter/story/progress_bar_formatter', 'Formatter::Story::ProgressBarFormatter'],
|
32
|
-
'r' => ['spec/runner/formatter/story/progress_bar_formatter', 'Formatter::Story::ProgressBarFormatter']
|
33
|
-
|
34
|
-
}
|
35
|
-
|
36
26
|
attr_accessor(
|
37
27
|
:filename_pattern,
|
38
28
|
:backtrace_tweaker,
|
@@ -94,11 +84,14 @@ module Spec
|
|
94
84
|
runner.load_files(files_to_load)
|
95
85
|
@files_loaded = true
|
96
86
|
end
|
87
|
+
|
88
|
+
define_predicate_matchers
|
89
|
+
plugin_mock_framework
|
97
90
|
|
98
91
|
# TODO - this has to happen after the files get loaded,
|
99
92
|
# otherwise the before_suite_parts are not populated
|
100
93
|
# from the configuration. There is no spec for this
|
101
|
-
# directly, but
|
94
|
+
# directly, but features/before_and_after_blocks/before_and_after_blocks.story
|
102
95
|
# will fail if this happens before the files are loaded.
|
103
96
|
before_suite_parts.each do |part|
|
104
97
|
part.call
|
@@ -115,7 +108,7 @@ module Spec
|
|
115
108
|
end
|
116
109
|
ensure
|
117
110
|
after_suite_parts.each do |part|
|
118
|
-
part.call(success)
|
111
|
+
part.arity < 1 ? part.call : part.call(success)
|
119
112
|
end
|
120
113
|
end
|
121
114
|
end
|
@@ -136,11 +129,6 @@ module Spec
|
|
136
129
|
@examples_should_be_run = false
|
137
130
|
end
|
138
131
|
|
139
|
-
def predicate_matchers
|
140
|
-
# TODO - don't like this dependency - perhaps store these in here instead?
|
141
|
-
Spec::Runner.configuration.predicate_matchers
|
142
|
-
end
|
143
|
-
|
144
132
|
def mock_framework
|
145
133
|
# TODO - don't like this dependency - perhaps store this in here instead?
|
146
134
|
Spec::Runner.configuration.mock_framework
|
@@ -199,11 +187,6 @@ module Spec
|
|
199
187
|
@formatters ||= load_formatters(@format_options, EXAMPLE_FORMATTERS)
|
200
188
|
end
|
201
189
|
|
202
|
-
def story_formatters
|
203
|
-
@format_options ||= [['plain', @output_stream]]
|
204
|
-
@formatters ||= load_formatters(@format_options, STORY_FORMATTERS)
|
205
|
-
end
|
206
|
-
|
207
190
|
def load_formatters(format_options, formatters)
|
208
191
|
format_options.map do |format, where|
|
209
192
|
formatter_type = if formatters[format]
|
@@ -217,9 +200,9 @@ module Spec
|
|
217
200
|
end
|
218
201
|
|
219
202
|
def load_heckle_runner(heckle)
|
220
|
-
suffix = [/mswin/, /java/].detect{|p| p =~ RUBY_PLATFORM} ? '_unsupported' : ''
|
203
|
+
suffix = ([/mswin/, /java/].detect{|p| p =~ RUBY_PLATFORM} || Spec::Ruby.version.to_f == 1.9) ? '_unsupported' : ''
|
221
204
|
require "spec/runner/heckle_runner#{suffix}"
|
222
|
-
@heckle_runner = HeckleRunner.new(heckle)
|
205
|
+
@heckle_runner = ::Spec::Runner::HeckleRunner.new(heckle)
|
223
206
|
end
|
224
207
|
|
225
208
|
def number_of_examples
|
@@ -247,7 +230,26 @@ module Spec
|
|
247
230
|
@dry_run == true
|
248
231
|
end
|
249
232
|
|
250
|
-
|
233
|
+
protected
|
234
|
+
|
235
|
+
def define_predicate_matchers
|
236
|
+
Spec::Runner.configuration.predicate_matchers.each_pair do |matcher_method, method_on_object|
|
237
|
+
Spec::Example::ExampleMethods::__send__ :define_method, matcher_method do |*args|
|
238
|
+
eval("be_#{method_on_object.to_s.gsub('?','')}(*args)")
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
def plugin_mock_framework
|
244
|
+
case mock_framework
|
245
|
+
when Module
|
246
|
+
Spec::Example::ExampleMethods.__send__ :include, mock_framework
|
247
|
+
else
|
248
|
+
require mock_framework
|
249
|
+
Spec::Example::ExampleMethods.__send__ :include, Spec::Adapters::MockFramework
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
251
253
|
def examples_should_be_run?
|
252
254
|
return @examples_should_be_run unless @examples_should_be_run.nil?
|
253
255
|
@examples_should_be_run = true
|
@@ -304,7 +306,7 @@ module Spec
|
|
304
306
|
|
305
307
|
def default_differ
|
306
308
|
require 'spec/expectations/differs/default'
|
307
|
-
self.differ_class = Spec::Expectations::Differs::Default
|
309
|
+
self.differ_class = ::Spec::Expectations::Differs::Default
|
308
310
|
end
|
309
311
|
|
310
312
|
def set_spec_from_line_number
|
data/lib/spec/runner/reporter.rb
CHANGED
@@ -32,15 +32,14 @@ module Spec
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
def
|
35
|
+
def example_failed(example, error)
|
36
36
|
backtrace_tweaker.tweak_backtrace(error)
|
37
|
-
failure = Failure.new(example, error)
|
37
|
+
failure = Failure.new(example_groups.empty? ? "" : example_groups.last.description, example, error)
|
38
38
|
@failures << failure
|
39
39
|
formatters.each do |f|
|
40
40
|
f.example_failed(example, @failures.length, failure)
|
41
41
|
end
|
42
42
|
end
|
43
|
-
alias_method :example_failed, :failure
|
44
43
|
|
45
44
|
def start(number_of_examples)
|
46
45
|
clear
|
@@ -134,11 +133,10 @@ module Spec
|
|
134
133
|
class Failure
|
135
134
|
attr_reader :example, :exception
|
136
135
|
|
137
|
-
def initialize(example, exception)
|
138
|
-
@example = example
|
139
|
-
@exception = exception
|
136
|
+
def initialize(group, example, exception)
|
137
|
+
@group, @example, @exception = group, example, exception
|
140
138
|
end
|
141
|
-
|
139
|
+
|
142
140
|
def header
|
143
141
|
if expectation_not_met?
|
144
142
|
"'#{example_name}' FAILED"
|
@@ -157,9 +155,10 @@ module Spec
|
|
157
155
|
@exception.is_a?(Spec::Expectations::ExpectationNotMetError)
|
158
156
|
end
|
159
157
|
|
160
|
-
|
158
|
+
protected
|
159
|
+
|
161
160
|
def example_name
|
162
|
-
@example.
|
161
|
+
"#{@group} #{@example.description}"
|
163
162
|
end
|
164
163
|
end
|
165
164
|
end
|
data/lib/spec/runner.rb
CHANGED
@@ -15,11 +15,10 @@ module Spec
|
|
15
15
|
class ExampleGroupCreationListener
|
16
16
|
def register_example_group(klass)
|
17
17
|
Spec::Runner.options.add_example_group klass
|
18
|
-
Spec::Runner.register_at_exit_hook
|
19
18
|
end
|
20
19
|
end
|
21
20
|
|
22
|
-
Spec::Example::
|
21
|
+
Spec::Example::ExampleGroupFactory.example_group_creation_listeners << ExampleGroupCreationListener.new
|
23
22
|
|
24
23
|
class << self
|
25
24
|
def configuration # :nodoc:
|
@@ -40,17 +39,9 @@ module Spec
|
|
40
39
|
def configure
|
41
40
|
yield configuration
|
42
41
|
end
|
43
|
-
|
44
|
-
def
|
45
|
-
unless
|
46
|
-
at_exit do
|
47
|
-
unless $! || run? || Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?(options.example_groups)
|
48
|
-
success = run
|
49
|
-
exit success if exit?
|
50
|
-
end
|
51
|
-
end
|
52
|
-
@already_registered_at_exit_hook = true
|
53
|
-
end
|
42
|
+
|
43
|
+
def autorun # :nodoc:
|
44
|
+
at_exit {exit run unless $!}
|
54
45
|
end
|
55
46
|
|
56
47
|
def options # :nodoc:
|
@@ -65,24 +56,11 @@ module Spec
|
|
65
56
|
@options = options
|
66
57
|
end
|
67
58
|
|
68
|
-
def test_unit_defined?
|
69
|
-
Object.const_defined?(:Test) && Test.const_defined?(:Unit) && Test::Unit.respond_to?(:run?)
|
70
|
-
end
|
71
|
-
|
72
|
-
def run?
|
73
|
-
Runner.options.examples_run?
|
74
|
-
end
|
75
|
-
|
76
59
|
def run
|
77
|
-
return true if
|
60
|
+
return true if options.examples_run?
|
78
61
|
options.run_examples
|
79
62
|
end
|
80
63
|
|
81
|
-
def exit?
|
82
|
-
!test_unit_defined? || Test::Unit.run?
|
83
|
-
end
|
84
64
|
end
|
85
65
|
end
|
86
|
-
end
|
87
|
-
|
88
|
-
require 'spec/interop/test' if Spec::Runner::test_unit_defined?
|
66
|
+
end
|
data/lib/spec/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
$:.push File.join(File.dirname(__FILE__), *%w[.. ..
|
1
|
+
$:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
|
2
2
|
require 'spec'
|
3
3
|
|
4
|
-
# Uncommenting next line will break the output
|
4
|
+
# Uncommenting next line will break the output feature (no output!!)
|
5
5
|
# rspec_options
|
6
6
|
options = Spec::Runner::OptionParser.parse(
|
7
7
|
ARGV, $stderr, $stdout
|
@@ -1,7 +1,6 @@
|
|
1
1
|
$:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
|
2
|
-
require 'spec'
|
3
|
-
|
4
|
-
require 'spec/interop/test'
|
2
|
+
require 'spec/autorun'
|
3
|
+
require 'spec/test/unit'
|
5
4
|
|
6
5
|
describe "An Example" do
|
7
6
|
it "should pass with assert" do
|
data/rspec.gemspec
CHANGED
@@ -2,23 +2,23 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspec}
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.99.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["RSpec Development Team"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-02-11}
|
10
10
|
s.description = %q{Behaviour Driven Development for Ruby.}
|
11
11
|
s.email = ["rspec-devel@rubyforge.org"]
|
12
12
|
s.executables = ["autospec", "spec"]
|
13
13
|
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/failing/README.txt", "examples/passing/priority.txt", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt"]
|
14
|
-
s.files = [".autotest", "History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "examples/failing/README.txt", "examples/failing/diffing_spec.rb", "examples/failing/failing_autogenerated_docstrings_example.rb", "examples/failing/failure_in_after.rb", "examples/failing/failure_in_before.rb", "examples/failing/mocking_example.rb", "examples/failing/mocking_with_flexmock.rb", "examples/failing/mocking_with_mocha.rb", "examples/failing/mocking_with_rr.rb", "examples/failing/partial_mock_example.rb", "examples/failing/predicate_example.rb", "examples/failing/raising_example.rb", "examples/failing/spec_helper.rb", "examples/failing/syntax_error_example.rb", "examples/failing/team_spec.rb", "examples/failing/timeout_behaviour.rb", "examples/passing/autogenerated_docstrings_example.rb", "examples/passing/before_and_after_example.rb", "examples/passing/behave_as_example.rb", "examples/passing/custom_expectation_matchers.rb", "examples/passing/custom_formatter.rb", "examples/passing/dynamic_spec.rb", "examples/passing/file_accessor.rb", "examples/passing/file_accessor_spec.rb", "examples/passing/greeter_spec.rb", "examples/passing/helper_method_example.rb", "examples/passing/io_processor.rb", "examples/passing/io_processor_spec.rb", "examples/passing/legacy_spec.rb", "examples/passing/mocking_example.rb", "examples/passing/multi_threaded_example_group_runner.rb", "examples/passing/nested_classes_example.rb", "examples/passing/partial_mock_example.rb", "examples/passing/pending_example.rb", "examples/passing/predicate_example.rb", "examples/passing/priority.txt", "examples/passing/shared_example_group_example.rb", "examples/passing/shared_stack_examples.rb", "examples/passing/simple_matcher_example.rb", "examples/passing/spec_helper.rb", "examples/passing/stack.rb", "examples/passing/stack_spec.rb", "examples/passing/stack_spec_with_nested_example_groups.rb", "examples/passing/stubbing_example.rb", "examples/passing/yielding_example.rb", "examples/ruby1.9.compatibility/access_to_constants_spec.rb", "features/before_and_after_blocks/before_and_after_blocks.feature", "features/example_groups/autogenerated_docstrings.feature", "features/example_groups/example_group_with_should_methods.feature", "features/example_groups/nested_groups.feature", "features/example_groups/output.feature", "features/interop/examples_and_tests_together.feature", "features/interop/test_but_not_test_unit.feature", "features/interop/test_case_with_should_methods.feature", "features/mock_framework_integration/use_flexmock.feature", "features/step_definitions/running_rspec.rb", "features/support/env.rb", "features/support/helpers/cmdline.rb", "features/support/helpers/story_helper.rb", "features/support/matchers/smart_match.rb", "init.rb", "lib/adapters/mock_frameworks/flexmock.rb", "lib/adapters/mock_frameworks/mocha.rb", "lib/adapters/mock_frameworks/rr.rb", "lib/adapters/mock_frameworks/rspec.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/dsl.rb", "lib/spec/dsl/main.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/errors.rb", "lib/spec/example/example_group.rb", "lib/spec/example/example_group_factory.rb", "lib/spec/example/example_group_methods.rb", "lib/spec/example/example_matcher.rb", "lib/spec/example/example_methods.rb", "lib/spec/example/module_reopening_fix.rb", "lib/spec/example/pending.rb", "lib/spec/example/shared_example_group.rb", "lib/spec/expectations.rb", "lib/spec/expectations/differs/default.rb", "lib/spec/expectations/errors.rb", "lib/spec/expectations/extensions.rb", "lib/spec/expectations/extensions/object.rb", "lib/spec/expectations/extensions/string_and_symbol.rb", "lib/spec/expectations/handler.rb", "lib/spec/interop/test.rb", "lib/spec/interop/test/unit/autorunner.rb", "lib/spec/interop/test/unit/testcase.rb", "lib/spec/interop/test/unit/testresult.rb", "lib/spec/interop/test/unit/testsuite_adapter.rb", "lib/spec/interop/test/unit/ui/console/testrunner.rb", "lib/spec/matchers.rb", "lib/spec/matchers/be.rb", "lib/spec/matchers/be_close.rb", "lib/spec/matchers/change.rb", "lib/spec/matchers/eql.rb", "lib/spec/matchers/equal.rb", "lib/spec/matchers/errors.rb", "lib/spec/matchers/exist.rb", "lib/spec/matchers/generated_descriptions.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.rb", "lib/spec/matchers/match_array.rb", "lib/spec/matchers/method_missing.rb", "lib/spec/matchers/operator_matcher.rb", "lib/spec/matchers/raise_error.rb", "lib/spec/matchers/respond_to.rb", "lib/spec/matchers/satisfy.rb", "lib/spec/matchers/simple_matcher.rb", "lib/spec/matchers/throw_symbol.rb", "lib/spec/matchers/wrap_expectation.rb", "lib/spec/mocks.rb", "lib/spec/mocks/argument_constraints.rb", "lib/spec/mocks/argument_expectation.rb", "lib/spec/mocks/error_generator.rb", "lib/spec/mocks/errors.rb", "lib/spec/mocks/extensions.rb", "lib/spec/mocks/extensions/object.rb", "lib/spec/mocks/framework.rb", "lib/spec/mocks/message_expectation.rb", "lib/spec/mocks/methods.rb", "lib/spec/mocks/mock.rb", "lib/spec/mocks/order_group.rb", "lib/spec/mocks/proxy.rb", "lib/spec/mocks/space.rb", "lib/spec/mocks/spec_methods.rb", "lib/spec/rake/spectask.rb", "lib/spec/rake/verify_rcov.rb", "lib/spec/ruby.rb", "lib/spec/runner.rb", "lib/spec/runner/backtrace_tweaker.rb", "lib/spec/runner/class_and_arguments_parser.rb", "lib/spec/runner/command_line.rb", "lib/spec/runner/configuration.rb", "lib/spec/runner/drb_command_line.rb", "lib/spec/runner/example_group_runner.rb", "lib/spec/runner/formatter/base_formatter.rb", "lib/spec/runner/formatter/base_text_formatter.rb", "lib/spec/runner/formatter/failing_example_groups_formatter.rb", "lib/spec/runner/formatter/failing_examples_formatter.rb", "lib/spec/runner/formatter/html_formatter.rb", "lib/spec/runner/formatter/nested_text_formatter.rb", "lib/spec/runner/formatter/profile_formatter.rb", "lib/spec/runner/formatter/progress_bar_formatter.rb", "lib/spec/runner/formatter/snippet_extractor.rb", "lib/spec/runner/formatter/specdoc_formatter.rb", "lib/spec/runner/formatter/story/html_formatter.rb", "lib/spec/runner/formatter/story/plain_text_formatter.rb", "lib/spec/runner/formatter/story/progress_bar_formatter.rb", "lib/spec/runner/formatter/text_mate_formatter.rb", "lib/spec/runner/heckle_runner.rb", "lib/spec/runner/heckle_runner_unsupported.rb", "lib/spec/runner/option_parser.rb", "lib/spec/runner/options.rb", "lib/spec/runner/reporter.rb", "lib/spec/runner/spec_parser.rb", "lib/spec/story.rb", "lib/spec/story/extensions.rb", "lib/spec/story/extensions/main.rb", "lib/spec/story/extensions/regexp.rb", "lib/spec/story/extensions/string.rb", "lib/spec/story/given_scenario.rb", "lib/spec/story/runner.rb", "lib/spec/story/runner/plain_text_story_runner.rb", "lib/spec/story/runner/scenario_collector.rb", "lib/spec/story/runner/scenario_runner.rb", "lib/spec/story/runner/story_mediator.rb", "lib/spec/story/runner/story_parser.rb", "lib/spec/story/runner/story_runner.rb", "lib/spec/story/scenario.rb", "lib/spec/story/step.rb", "lib/spec/story/step_group.rb", "lib/spec/story/step_mother.rb", "lib/spec/story/story.rb", "lib/spec/story/world.rb", "lib/spec/version.rb", "resources/rake/examples.rake", "resources/rake/examples_with_rcov.rake", "resources/rake/failing_examples_with_html.rake", "resources/rake/verify_rcov.rake", "resources/spec/example_group_with_should_methods.rb", "resources/spec/simple_spec.rb", "resources/spec/spec_with_flexmock.rb", "resources/test/spec_and_test_together.rb", "resources/test/spec_including_test_but_not_unit.rb", "resources/test/test_case_with_should_methods.rb", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/failed_results_re_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/dsl/main_spec.rb", "spec/spec/example/example_group_class_definition_spec.rb", "spec/spec/example/example_group_factory_spec.rb", "spec/spec/example/example_group_methods_spec.rb", "spec/spec/example/example_group_spec.rb", "spec/spec/example/example_matcher_spec.rb", "spec/spec/example/example_methods_spec.rb", "spec/spec/example/helper_method_spec.rb", "spec/spec/example/nested_example_group_spec.rb", "spec/spec/example/pending_module_spec.rb", "spec/spec/example/predicate_matcher_spec.rb", "spec/spec/example/shared_example_group_spec.rb", "spec/spec/example/subclassing_example_group_spec.rb", "spec/spec/expectations/differs/default_spec.rb", "spec/spec/expectations/extensions/object_spec.rb", "spec/spec/expectations/fail_with_spec.rb", "spec/spec/expectations/wrap_expectation_spec.rb", "spec/spec/interop/test/unit/resources/spec_that_fails.rb", "spec/spec/interop/test/unit/resources/spec_that_passes.rb", "spec/spec/interop/test/unit/resources/spec_with_errors.rb", "spec/spec/interop/test/unit/resources/spec_with_options_hash.rb", "spec/spec/interop/test/unit/resources/test_case_that_fails.rb", "spec/spec/interop/test/unit/resources/test_case_that_passes.rb", "spec/spec/interop/test/unit/resources/test_case_with_errors.rb", "spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb", "spec/spec/interop/test/unit/spec_spec.rb", "spec/spec/interop/test/unit/test_unit_spec_helper.rb", "spec/spec/interop/test/unit/testcase_spec.rb", "spec/spec/interop/test/unit/testsuite_adapter_spec.rb", "spec/spec/matchers/be_close_spec.rb", "spec/spec/matchers/be_spec.rb", "spec/spec/matchers/change_spec.rb", "spec/spec/matchers/description_generation_spec.rb", "spec/spec/matchers/eql_spec.rb", "spec/spec/matchers/equal_spec.rb", "spec/spec/matchers/exist_spec.rb", "spec/spec/matchers/handler_spec.rb", "spec/spec/matchers/has_spec.rb", "spec/spec/matchers/have_spec.rb", "spec/spec/matchers/include_spec.rb", "spec/spec/matchers/match_array_spec.rb", "spec/spec/matchers/match_spec.rb", "spec/spec/matchers/matcher_methods_spec.rb", "spec/spec/matchers/mock_constraint_matchers_spec.rb", "spec/spec/matchers/operator_matcher_spec.rb", "spec/spec/matchers/raise_error_spec.rb", "spec/spec/matchers/respond_to_spec.rb", "spec/spec/matchers/satisfy_spec.rb", "spec/spec/matchers/simple_matcher_spec.rb", "spec/spec/matchers/throw_symbol_spec.rb", "spec/spec/mocks/any_number_of_times_spec.rb", "spec/spec/mocks/argument_expectation_spec.rb", "spec/spec/mocks/at_least_spec.rb", "spec/spec/mocks/at_most_spec.rb", "spec/spec/mocks/bug_report_10260_spec.rb", "spec/spec/mocks/bug_report_10263_spec.rb", "spec/spec/mocks/bug_report_11545_spec.rb", "spec/spec/mocks/bug_report_15719_spec.rb", "spec/spec/mocks/bug_report_496.rb", "spec/spec/mocks/bug_report_600_spec.rb", "spec/spec/mocks/bug_report_7611_spec.rb", "spec/spec/mocks/bug_report_7805_spec.rb", "spec/spec/mocks/bug_report_8165_spec.rb", "spec/spec/mocks/bug_report_8302_spec.rb", "spec/spec/mocks/failing_mock_argument_constraints_spec.rb", "spec/spec/mocks/hash_including_matcher_spec.rb", "spec/spec/mocks/hash_not_including_matcher_spec.rb", "spec/spec/mocks/mock_ordering_spec.rb", "spec/spec/mocks/mock_space_spec.rb", "spec/spec/mocks/mock_spec.rb", "spec/spec/mocks/multiple_return_value_spec.rb", "spec/spec/mocks/nil_expectation_warning_spec.rb", "spec/spec/mocks/null_object_mock_spec.rb", "spec/spec/mocks/once_counts_spec.rb", "spec/spec/mocks/options_hash_spec.rb", "spec/spec/mocks/partial_mock_spec.rb", "spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb", "spec/spec/mocks/passing_mock_argument_constraints_spec.rb", "spec/spec/mocks/precise_counts_spec.rb", "spec/spec/mocks/record_messages_spec.rb", "spec/spec/mocks/stub_spec.rb", "spec/spec/mocks/stubbed_message_expectations_spec.rb", "spec/spec/mocks/twice_counts_spec.rb", "spec/spec/package/bin_spec_spec.rb", "spec/spec/runner/class_and_argument_parser_spec.rb", "spec/spec/runner/command_line_spec.rb", "spec/spec/runner/configuration_spec.rb", "spec/spec/runner/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/example_group_runner_spec.rb", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_formatter_spec.rb", "spec/spec/runner/formatter/base_text_formatter_spec.rb", "spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb", "spec/spec/runner/formatter/failing_examples_formatter_spec.rb", "spec/spec/runner/formatter/html_formatted-1.8.4.html", "spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.5.html", "spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.6.html", "spec/spec/runner/formatter/html_formatted-1.8.7.html", "spec/spec/runner/formatter/html_formatted-1.9.1.html", "spec/spec/runner/formatter/html_formatter_spec.rb", "spec/spec/runner/formatter/nested_text_formatter_spec.rb", "spec/spec/runner/formatter/profile_formatter_spec.rb", "spec/spec/runner/formatter/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/snippet_extractor_spec.rb", "spec/spec/runner/formatter/spec_mate_formatter_spec.rb", "spec/spec/runner/formatter/specdoc_formatter_spec.rb", "spec/spec/runner/formatter/story/html_formatter_spec.rb", "spec/spec/runner/formatter/story/plain_text_formatter_spec.rb", "spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/text_mate_formatted-1.8.4.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.6.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.7.html", "spec/spec/runner/formatter/text_mate_formatted-1.9.1.html", "spec/spec/runner/heckle_runner_spec.rb", "spec/spec/runner/heckler_spec.rb", "spec/spec/runner/noisy_backtrace_tweaker_spec.rb", "spec/spec/runner/option_parser_spec.rb", "spec/spec/runner/options_spec.rb", "spec/spec/runner/output_one_time_fixture.rb", "spec/spec/runner/output_one_time_fixture_runner.rb", "spec/spec/runner/output_one_time_spec.rb", "spec/spec/runner/quiet_backtrace_tweaker_spec.rb", "spec/spec/runner/reporter_spec.rb", "spec/spec/runner/resources/a_bar.rb", "spec/spec/runner/resources/a_foo.rb", "spec/spec/runner/resources/a_spec.rb", "spec/spec/runner/resources/custom_example_group_runner.rb", "spec/spec/runner/resources/utf8_encoded.rb", "spec/spec/runner/spec.opts", "spec/spec/runner/spec_drb.opts", "spec/spec/runner/spec_parser/spec_parser_fixture.rb", "spec/spec/runner/spec_parser_spec.rb", "spec/spec/runner/spec_spaced.opts", "spec/spec/runner_spec.rb", "spec/spec/spec_classes.rb", "spec/spec/spec_spec.rb", "spec/spec/story/builders.rb", "spec/spec/story/extensions/main_spec.rb", "spec/spec/story/extensions_spec.rb", "spec/spec/story/given_scenario_spec.rb", "spec/spec/story/runner/plain_text_story_runner_spec.rb", "spec/spec/story/runner/scenario_collector_spec.rb", "spec/spec/story/runner/scenario_runner_spec.rb", "spec/spec/story/runner/story_mediator_spec.rb", "spec/spec/story/runner/story_parser_spec.rb", "spec/spec/story/runner/story_runner_spec.rb", "spec/spec/story/runner_spec.rb", "spec/spec/story/scenario_spec.rb", "spec/spec/story/step_group_spec.rb", "spec/spec/story/step_mother_spec.rb", "spec/spec/story/step_spec.rb", "spec/spec/story/story_helper.rb", "spec/spec/story/story_spec.rb", "spec/spec/story/world_spec.rb", "spec/spec_helper.rb", "story_server/prototype/javascripts/builder.js", "story_server/prototype/javascripts/controls.js", "story_server/prototype/javascripts/dragdrop.js", "story_server/prototype/javascripts/effects.js", "story_server/prototype/javascripts/prototype.js", "story_server/prototype/javascripts/rspec.js", "story_server/prototype/javascripts/scriptaculous.js", "story_server/prototype/javascripts/slider.js", "story_server/prototype/javascripts/sound.js", "story_server/prototype/javascripts/unittest.js", "story_server/prototype/lib/server.rb", "story_server/prototype/stories.html", "story_server/prototype/stylesheets/rspec.css", "story_server/prototype/stylesheets/test.css"]
|
14
|
+
s.files = [".autotest", "History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "cucumber.yml", "examples/failing/README.txt", "examples/failing/diffing_spec.rb", "examples/failing/failing_autogenerated_docstrings_example.rb", "examples/failing/failure_in_after.rb", "examples/failing/failure_in_before.rb", "examples/failing/mocking_example.rb", "examples/failing/mocking_with_flexmock.rb", "examples/failing/mocking_with_mocha.rb", "examples/failing/mocking_with_rr.rb", "examples/failing/partial_mock_example.rb", "examples/failing/predicate_example.rb", "examples/failing/raising_example.rb", "examples/failing/spec_helper.rb", "examples/failing/syntax_error_example.rb", "examples/failing/team_spec.rb", "examples/failing/timeout_behaviour.rb", "examples/passing/autogenerated_docstrings_example.rb", "examples/passing/before_and_after_example.rb", "examples/passing/behave_as_example.rb", "examples/passing/custom_expectation_matchers.rb", "examples/passing/custom_formatter.rb", "examples/passing/dynamic_spec.rb", "examples/passing/file_accessor.rb", "examples/passing/file_accessor_spec.rb", "examples/passing/filtered_formatter.rb", "examples/passing/filtered_formatter_example.rb", "examples/passing/greeter_spec.rb", "examples/passing/helper_method_example.rb", "examples/passing/io_processor.rb", "examples/passing/io_processor_spec.rb", "examples/passing/mocking_example.rb", "examples/passing/multi_threaded_example_group_runner.rb", "examples/passing/nested_classes_example.rb", "examples/passing/partial_mock_example.rb", "examples/passing/pending_example.rb", "examples/passing/predicate_example.rb", "examples/passing/priority.txt", "examples/passing/shared_example_group_example.rb", "examples/passing/shared_stack_examples.rb", "examples/passing/simple_matcher_example.rb", "examples/passing/spec_helper.rb", "examples/passing/stack.rb", "examples/passing/stack_spec.rb", "examples/passing/stack_spec_with_nested_example_groups.rb", "examples/passing/stubbing_example.rb", "examples/passing/yielding_example.rb", "examples/ruby1.9.compatibility/access_to_constants_spec.rb", "features-pending/cli/conditional_exclusion.feature", "features/before_and_after_blocks/before_and_after_blocks.feature", "features/example_groups/autogenerated_docstrings.feature", "features/example_groups/example_group_with_should_methods.feature", "features/example_groups/nested_groups.feature", "features/example_groups/output.feature", "features/interop/examples_and_tests_together.feature", "features/interop/test_but_not_test_unit.feature", "features/interop/test_case_with_should_methods.feature", "features/mock_framework_integration/use_flexmock.feature", "features/mock_framework_integration/use_mocha.feature", "features/mock_framework_integration/use_rr.feature", "features/step_definitions/running_rspec.rb", "features/support/env.rb", "features/support/matchers/smart_match.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/adapters/mock_frameworks/flexmock.rb", "lib/spec/adapters/mock_frameworks/mocha.rb", "lib/spec/adapters/mock_frameworks/rr.rb", "lib/spec/adapters/mock_frameworks/rspec.rb", "lib/spec/autorun.rb", "lib/spec/dsl.rb", "lib/spec/dsl/main.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/errors.rb", "lib/spec/example/example_description.rb", "lib/spec/example/example_group.rb", "lib/spec/example/example_group_factory.rb", "lib/spec/example/example_group_hierarchy.rb", "lib/spec/example/example_group_methods.rb", "lib/spec/example/example_matcher.rb", "lib/spec/example/example_methods.rb", "lib/spec/example/module_reopening_fix.rb", "lib/spec/example/pending.rb", "lib/spec/example/predicate_matchers.rb", "lib/spec/example/shared_example_group.rb", "lib/spec/example/subject.rb", "lib/spec/expectations.rb", "lib/spec/expectations/differs/default.rb", "lib/spec/expectations/errors.rb", "lib/spec/expectations/extensions.rb", "lib/spec/expectations/extensions/object.rb", "lib/spec/expectations/handler.rb", "lib/spec/interop/test.rb", "lib/spec/interop/test/unit/autorunner.rb", "lib/spec/interop/test/unit/testcase.rb", "lib/spec/interop/test/unit/testresult.rb", "lib/spec/interop/test/unit/testsuite_adapter.rb", "lib/spec/interop/test/unit/ui/console/testrunner.rb", "lib/spec/matchers.rb", "lib/spec/matchers/be.rb", "lib/spec/matchers/be_close.rb", "lib/spec/matchers/change.rb", "lib/spec/matchers/eql.rb", "lib/spec/matchers/equal.rb", "lib/spec/matchers/errors.rb", "lib/spec/matchers/exist.rb", "lib/spec/matchers/generated_descriptions.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.rb", "lib/spec/matchers/match_array.rb", "lib/spec/matchers/method_missing.rb", "lib/spec/matchers/operator_matcher.rb", "lib/spec/matchers/raise_error.rb", "lib/spec/matchers/respond_to.rb", "lib/spec/matchers/satisfy.rb", "lib/spec/matchers/simple_matcher.rb", "lib/spec/matchers/throw_symbol.rb", "lib/spec/matchers/wrap_expectation.rb", "lib/spec/mocks.rb", "lib/spec/mocks/argument_expectation.rb", "lib/spec/mocks/argument_matchers.rb", "lib/spec/mocks/error_generator.rb", "lib/spec/mocks/errors.rb", "lib/spec/mocks/extensions.rb", "lib/spec/mocks/extensions/object.rb", "lib/spec/mocks/framework.rb", "lib/spec/mocks/message_expectation.rb", "lib/spec/mocks/methods.rb", "lib/spec/mocks/mock.rb", "lib/spec/mocks/order_group.rb", "lib/spec/mocks/proxy.rb", "lib/spec/mocks/space.rb", "lib/spec/mocks/spec_methods.rb", "lib/spec/rake/spectask.rb", "lib/spec/rake/verify_rcov.rb", "lib/spec/ruby.rb", "lib/spec/runner.rb", "lib/spec/runner/backtrace_tweaker.rb", "lib/spec/runner/class_and_arguments_parser.rb", "lib/spec/runner/command_line.rb", "lib/spec/runner/configuration.rb", "lib/spec/runner/drb_command_line.rb", "lib/spec/runner/example_group_runner.rb", "lib/spec/runner/formatter/base_formatter.rb", "lib/spec/runner/formatter/base_text_formatter.rb", "lib/spec/runner/formatter/failing_example_groups_formatter.rb", "lib/spec/runner/formatter/failing_examples_formatter.rb", "lib/spec/runner/formatter/html_formatter.rb", "lib/spec/runner/formatter/nested_text_formatter.rb", "lib/spec/runner/formatter/profile_formatter.rb", "lib/spec/runner/formatter/progress_bar_formatter.rb", "lib/spec/runner/formatter/snippet_extractor.rb", "lib/spec/runner/formatter/specdoc_formatter.rb", "lib/spec/runner/formatter/text_mate_formatter.rb", "lib/spec/runner/heckle_runner.rb", "lib/spec/runner/heckle_runner_unsupported.rb", "lib/spec/runner/option_parser.rb", "lib/spec/runner/options.rb", "lib/spec/runner/reporter.rb", "lib/spec/runner/spec_parser.rb", "lib/spec/test/unit.rb", "lib/spec/version.rb", "resources/helpers/cmdline.rb", "resources/rake/examples.rake", "resources/rake/examples_with_rcov.rake", "resources/rake/failing_examples_with_html.rake", "resources/rake/verify_rcov.rake", "resources/spec/example_group_with_should_methods.rb", "resources/spec/simple_spec.rb", "resources/test/spec_and_test_together.rb", "resources/test/spec_including_test_but_not_unit.rb", "resources/test/test_case_with_should_methods.rb", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/failed_results_re_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/dsl/main_spec.rb", "spec/spec/example/example_group_class_definition_spec.rb", "spec/spec/example/example_group_factory_spec.rb", "spec/spec/example/example_group_methods_spec.rb", "spec/spec/example/example_group_spec.rb", "spec/spec/example/example_matcher_spec.rb", "spec/spec/example/example_methods_spec.rb", "spec/spec/example/helper_method_spec.rb", "spec/spec/example/nested_example_group_spec.rb", "spec/spec/example/pending_module_spec.rb", "spec/spec/example/predicate_matcher_spec.rb", "spec/spec/example/shared_example_group_spec.rb", "spec/spec/example/subclassing_example_group_spec.rb", "spec/spec/expectations/differs/default_spec.rb", "spec/spec/expectations/extensions/object_spec.rb", "spec/spec/expectations/fail_with_spec.rb", "spec/spec/expectations/wrap_expectation_spec.rb", "spec/spec/interop/test/unit/resources/spec_that_fails.rb", "spec/spec/interop/test/unit/resources/spec_that_passes.rb", "spec/spec/interop/test/unit/resources/spec_with_errors.rb", "spec/spec/interop/test/unit/resources/spec_with_options_hash.rb", "spec/spec/interop/test/unit/resources/test_case_that_fails.rb", "spec/spec/interop/test/unit/resources/test_case_that_passes.rb", "spec/spec/interop/test/unit/resources/test_case_with_errors.rb", "spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb", "spec/spec/interop/test/unit/spec_spec.rb", "spec/spec/interop/test/unit/test_unit_spec_helper.rb", "spec/spec/interop/test/unit/testcase_spec.rb", "spec/spec/interop/test/unit/testsuite_adapter_spec.rb", "spec/spec/matchers/be_close_spec.rb", "spec/spec/matchers/be_spec.rb", "spec/spec/matchers/change_spec.rb", "spec/spec/matchers/description_generation_spec.rb", "spec/spec/matchers/eql_spec.rb", "spec/spec/matchers/equal_spec.rb", "spec/spec/matchers/exist_spec.rb", "spec/spec/matchers/handler_spec.rb", "spec/spec/matchers/has_spec.rb", "spec/spec/matchers/have_spec.rb", "spec/spec/matchers/include_spec.rb", "spec/spec/matchers/match_array_spec.rb", "spec/spec/matchers/match_spec.rb", "spec/spec/matchers/matcher_methods_spec.rb", "spec/spec/matchers/operator_matcher_spec.rb", "spec/spec/matchers/raise_error_spec.rb", "spec/spec/matchers/respond_to_spec.rb", "spec/spec/matchers/satisfy_spec.rb", "spec/spec/matchers/simple_matcher_spec.rb", "spec/spec/matchers/throw_symbol_spec.rb", "spec/spec/mocks/any_number_of_times_spec.rb", "spec/spec/mocks/argument_expectation_spec.rb", "spec/spec/mocks/at_least_spec.rb", "spec/spec/mocks/at_most_spec.rb", "spec/spec/mocks/bug_report_10260_spec.rb", "spec/spec/mocks/bug_report_10263_spec.rb", "spec/spec/mocks/bug_report_11545_spec.rb", "spec/spec/mocks/bug_report_15719_spec.rb", "spec/spec/mocks/bug_report_496_spec.rb", "spec/spec/mocks/bug_report_600_spec.rb", "spec/spec/mocks/bug_report_7611_spec.rb", "spec/spec/mocks/bug_report_7805_spec.rb", "spec/spec/mocks/bug_report_8165_spec.rb", "spec/spec/mocks/bug_report_8302_spec.rb", "spec/spec/mocks/failing_argument_matchers_spec.rb", "spec/spec/mocks/hash_including_matcher_spec.rb", "spec/spec/mocks/hash_not_including_matcher_spec.rb", "spec/spec/mocks/mock_ordering_spec.rb", "spec/spec/mocks/mock_space_spec.rb", "spec/spec/mocks/mock_spec.rb", "spec/spec/mocks/multiple_return_value_spec.rb", "spec/spec/mocks/nil_expectation_warning_spec.rb", "spec/spec/mocks/null_object_mock_spec.rb", "spec/spec/mocks/once_counts_spec.rb", "spec/spec/mocks/options_hash_spec.rb", "spec/spec/mocks/partial_mock_spec.rb", "spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb", "spec/spec/mocks/passing_argument_matchers_spec.rb", "spec/spec/mocks/precise_counts_spec.rb", "spec/spec/mocks/record_messages_spec.rb", "spec/spec/mocks/stub_spec.rb", "spec/spec/mocks/stubbed_message_expectations_spec.rb", "spec/spec/mocks/twice_counts_spec.rb", "spec/spec/package/bin_spec_spec.rb", "spec/spec/runner/class_and_argument_parser_spec.rb", "spec/spec/runner/command_line_spec.rb", "spec/spec/runner/configuration_spec.rb", "spec/spec/runner/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/example_group_runner_spec.rb", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_formatter_spec.rb", "spec/spec/runner/formatter/base_text_formatter_spec.rb", "spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb", "spec/spec/runner/formatter/failing_examples_formatter_spec.rb", "spec/spec/runner/formatter/html_formatted-1.8.4.html", "spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.5.html", "spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.6.html", "spec/spec/runner/formatter/html_formatted-1.8.7.html", "spec/spec/runner/formatter/html_formatted-1.9.1.html", "spec/spec/runner/formatter/html_formatter_spec.rb", "spec/spec/runner/formatter/nested_text_formatter_spec.rb", "spec/spec/runner/formatter/profile_formatter_spec.rb", "spec/spec/runner/formatter/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/snippet_extractor_spec.rb", "spec/spec/runner/formatter/specdoc_formatter_spec.rb", "spec/spec/runner/formatter/text_mate_formatted-1.8.4.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.6.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.7.html", "spec/spec/runner/formatter/text_mate_formatted-1.9.1.html", "spec/spec/runner/formatter/text_mate_formatter_spec.rb", "spec/spec/runner/heckle_runner_spec.rb", "spec/spec/runner/heckler_spec.rb", "spec/spec/runner/noisy_backtrace_tweaker_spec.rb", "spec/spec/runner/option_parser_spec.rb", "spec/spec/runner/options_spec.rb", "spec/spec/runner/output_one_time_fixture.rb", "spec/spec/runner/output_one_time_fixture_runner.rb", "spec/spec/runner/output_one_time_spec.rb", "spec/spec/runner/quiet_backtrace_tweaker_spec.rb", "spec/spec/runner/reporter_spec.rb", "spec/spec/runner/resources/a_bar.rb", "spec/spec/runner/resources/a_foo.rb", "spec/spec/runner/resources/a_spec.rb", "spec/spec/runner/resources/custom_example_group_runner.rb", "spec/spec/runner/resources/utf8_encoded.rb", "spec/spec/runner/spec.opts", "spec/spec/runner/spec_drb.opts", "spec/spec/runner/spec_parser/spec_parser_fixture.rb", "spec/spec/runner/spec_parser_spec.rb", "spec/spec/runner/spec_spaced.opts", "spec/spec/runner_spec.rb", "spec/spec/spec_classes.rb", "spec/spec_helper.rb"]
|
15
15
|
s.has_rdoc = true
|
16
16
|
s.homepage = %q{http://rspec.info/}
|
17
17
|
s.rdoc_options = ["--main", "README.txt"]
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
s.rubyforge_project = %q{rspec}
|
20
20
|
s.rubygems_version = %q{1.3.1}
|
21
|
-
s.summary = %q{rspec 1.1.
|
21
|
+
s.summary = %q{rspec 1.1.99.1}
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
24
24
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
28
|
s.add_development_dependency(%q<cucumber>, [">= 0.1.13"])
|
29
|
-
s.add_development_dependency(%q<hoe>, [">= 1.8.
|
29
|
+
s.add_development_dependency(%q<hoe>, [">= 1.8.3"])
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
data/spec/spec/dsl/main_spec.rb
CHANGED
@@ -10,7 +10,7 @@ module Spec
|
|
10
10
|
[:describe, :context].each do |method|
|
11
11
|
describe "##{method}" do
|
12
12
|
it "should delegate to Spec::Example::ExampleGroupFactory.create_example_group" do
|
13
|
-
block = lambda {}
|
13
|
+
block = lambda {|a,b|}
|
14
14
|
Spec::Example::ExampleGroupFactory.should_receive(:create_example_group).with(
|
15
15
|
"The ExampleGroup", hash_including(:spec_path), &block
|
16
16
|
)
|
@@ -22,7 +22,7 @@ module Spec
|
|
22
22
|
[:share_examples_for, :shared_examples_for].each do |method|
|
23
23
|
describe "##{method}" do
|
24
24
|
it "should create a shared ExampleGroup" do
|
25
|
-
block = lambda {}
|
25
|
+
block = lambda {|a,b|}
|
26
26
|
Spec::Example::ExampleGroupFactory.should_receive(:create_shared_example_group).with(
|
27
27
|
"shared group", hash_including(:spec_path), &block
|
28
28
|
)
|
@@ -63,7 +63,7 @@ module Spec
|
|
63
63
|
end
|
64
64
|
|
65
65
|
it "registers a shared ExampleGroup" do
|
66
|
-
block = lambda {}
|
66
|
+
block = lambda {|a,b|}
|
67
67
|
Spec::Example::ExampleGroupFactory.should_receive(:create_shared_example_group).with(
|
68
68
|
group_name, hash_including(:spec_path), &block
|
69
69
|
)
|
@@ -3,18 +3,14 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
3
|
module Spec
|
4
4
|
module Example
|
5
5
|
class ExampleGroupSubclass < ExampleGroup
|
6
|
-
|
7
|
-
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.examples_ran=(examples_ran)
|
11
|
-
@examples_ran = examples_ran
|
6
|
+
class << self
|
7
|
+
attr_accessor :examples_ran
|
12
8
|
end
|
13
9
|
|
14
10
|
@@class_variable = :class_variable
|
15
11
|
CONSTANT = :constant
|
16
12
|
|
17
|
-
before do
|
13
|
+
before(:each) do
|
18
14
|
@instance_variable = :instance_variable
|
19
15
|
end
|
20
16
|
|
@@ -22,25 +18,26 @@ module Spec
|
|
22
18
|
self.class.examples_ran = true
|
23
19
|
end
|
24
20
|
|
25
|
-
|
21
|
+
def a_method
|
22
|
+
22
|
23
|
+
end
|
24
|
+
|
25
|
+
it "can access instance variables defined before(:each)" do
|
26
26
|
@instance_variable.should == :instance_variable
|
27
27
|
end
|
28
28
|
|
29
|
-
it "
|
29
|
+
it "can access class variables" do
|
30
30
|
@@class_variable.should == :class_variable
|
31
31
|
end
|
32
32
|
|
33
|
-
it "
|
33
|
+
it "can access constants" do
|
34
34
|
CONSTANT.should == :constant
|
35
35
|
end
|
36
36
|
|
37
|
-
it "
|
37
|
+
it "can access methods defined in the Example Group" do
|
38
38
|
a_method.should == 22
|
39
39
|
end
|
40
40
|
|
41
|
-
def a_method
|
42
|
-
22
|
43
|
-
end
|
44
41
|
end
|
45
42
|
|
46
43
|
describe ExampleGroupSubclass do
|