rspec 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +30 -3
- data/License.txt +22 -0
- data/Manifest.txt +3 -3
- data/README.txt +1 -25
- data/Rakefile +4 -2
- data/TODO.txt +5 -4
- data/bin/autospec +1 -1
- data/examples/pure/shared_example_group_example.rb +2 -2
- data/lib/autotest/rspec.rb +1 -1
- data/lib/spec.rb +5 -1
- data/lib/spec/example.rb +1 -1
- data/lib/spec/example/before_and_after_hooks.rb +93 -0
- data/lib/spec/example/configuration.rb +10 -1
- data/lib/spec/example/example_group.rb +2 -1
- data/lib/spec/example/example_group_factory.rb +18 -1
- data/lib/spec/example/example_group_methods.rb +45 -123
- data/lib/spec/example/example_methods.rb +9 -6
- data/lib/spec/example/shared_example_group.rb +6 -12
- data/lib/spec/extensions/main.rb +1 -1
- data/lib/spec/interop/test/unit/testcase.rb +1 -1
- data/lib/spec/mocks/error_generator.rb +1 -1
- data/lib/spec/mocks/message_expectation.rb +19 -4
- data/lib/spec/mocks/methods.rb +2 -2
- data/lib/spec/mocks/proxy.rb +4 -5
- data/lib/spec/runner.rb +3 -4
- data/lib/spec/runner/formatter/nested_text_formatter.rb +3 -3
- data/lib/spec/runner/option_parser.rb +23 -22
- data/lib/spec/version.rb +1 -1
- data/rspec.gemspec +19 -8
- data/spec/autotest/rspec_spec.rb +5 -1
- data/spec/spec/example/configuration_spec.rb +229 -215
- data/spec/spec/example/example_group_class_definition_spec.rb +9 -9
- data/spec/spec/example/example_group_factory_spec.rb +48 -27
- data/spec/spec/example/example_group_methods_spec.rb +436 -426
- data/spec/spec/example/example_group_spec.rb +459 -500
- data/spec/spec/example/example_methods_spec.rb +92 -86
- data/spec/spec/example/shared_example_group_spec.rb +219 -203
- data/spec/spec/extensions/main_spec.rb +23 -23
- data/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +13 -0
- data/spec/spec/interop/test/unit/spec_spec.rb +15 -8
- data/spec/spec/mocks/mock_spec.rb +12 -2
- data/spec/spec/mocks/nil_expectation_warning_spec.rb +0 -1
- data/spec/spec/mocks/partial_mock_spec.rb +10 -5
- data/spec/spec/package/bin_spec_spec.rb +8 -0
- data/spec/spec/runner/command_line_spec.rb +101 -100
- data/spec/spec/runner/drb_command_line_spec.rb +0 -2
- data/spec/spec/runner/formatter/html_formatter_spec.rb +1 -4
- data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +230 -245
- data/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +2 -3
- data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +110 -109
- data/spec/spec/runner/option_parser_spec.rb +18 -6
- data/spec/spec_helper.rb +26 -5
- data/stories/mock_framework_integration/use_flexmock.story +1 -1
- metadata +38 -7
- data/lib/spec/example/module_inclusion_warnings.rb +0 -38
- data/spec/spec/example/example_group/described_module_spec.rb +0 -20
- data/spec/spec/example/example_group/warning_messages_spec.rb +0 -76
@@ -1,9 +1,8 @@
|
|
1
1
|
module Spec
|
2
2
|
module Example
|
3
3
|
module ExampleMethods
|
4
|
-
|
4
|
+
|
5
5
|
extend ModuleReopeningFix
|
6
|
-
include ModuleInclusionWarnings
|
7
6
|
|
8
7
|
def execute(options, instance_variables)
|
9
8
|
options.reporter.example_started(self)
|
@@ -12,13 +11,13 @@ module Spec
|
|
12
11
|
execution_error = nil
|
13
12
|
Timeout.timeout(options.timeout) do
|
14
13
|
begin
|
15
|
-
|
14
|
+
before_each_example
|
16
15
|
eval_block
|
17
16
|
rescue Exception => e
|
18
17
|
execution_error ||= e
|
19
18
|
end
|
20
19
|
begin
|
21
|
-
|
20
|
+
after_each_example
|
22
21
|
rescue Exception => e
|
23
22
|
execution_error ||= e
|
24
23
|
end
|
@@ -60,6 +59,10 @@ module Spec
|
|
60
59
|
def description
|
61
60
|
@_defined_description || ::Spec::Matchers.generated_description || "NO NAME"
|
62
61
|
end
|
62
|
+
|
63
|
+
def options
|
64
|
+
@_options
|
65
|
+
end
|
63
66
|
|
64
67
|
def __full_description
|
65
68
|
"#{self.class.description} #{self.description}"
|
@@ -86,12 +89,12 @@ module Spec
|
|
86
89
|
include Matchers
|
87
90
|
include Pending
|
88
91
|
|
89
|
-
def
|
92
|
+
def before_each_example
|
90
93
|
setup_mocks_for_rspec
|
91
94
|
self.class.run_before_each(self)
|
92
95
|
end
|
93
96
|
|
94
|
-
def
|
97
|
+
def after_each_example
|
95
98
|
self.class.run_after_each(self)
|
96
99
|
verify_mocks_for_rspec
|
97
100
|
ensure
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Spec
|
2
2
|
module Example
|
3
3
|
class SharedExampleGroup < Module
|
4
|
-
|
4
|
+
module ClassMethods
|
5
5
|
def add_shared_example_group(new_example_group)
|
6
6
|
guard_against_redefining_existing_example_group(new_example_group)
|
7
7
|
shared_example_groups << new_example_group
|
@@ -14,10 +14,7 @@ module Spec
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def shared_example_groups
|
17
|
-
|
18
|
-
# from subclasses of Example in a centralized place. I'm not loving
|
19
|
-
# this as a solution, but it works for now.
|
20
|
-
$shared_example_groups ||= []
|
17
|
+
@shared_example_groups ||= []
|
21
18
|
end
|
22
19
|
|
23
20
|
private
|
@@ -33,8 +30,9 @@ module Spec
|
|
33
30
|
File.expand_path(example_group.spec_path)
|
34
31
|
end
|
35
32
|
end
|
33
|
+
|
34
|
+
extend ClassMethods
|
36
35
|
include ExampleGroupMethods
|
37
|
-
public :include
|
38
36
|
|
39
37
|
def initialize(*args, &example_group_block)
|
40
38
|
describe(*args)
|
@@ -46,12 +44,8 @@ module Spec
|
|
46
44
|
mod.module_eval(&@example_group_block)
|
47
45
|
end
|
48
46
|
|
49
|
-
def
|
50
|
-
|
51
|
-
superclass_last ? classes << ExampleMethods : classes.unshift(ExampleMethods)
|
52
|
-
classes.each do |example_group|
|
53
|
-
yield example_group
|
54
|
-
end
|
47
|
+
def each_ancestor_example_group_class(superclass_last=false)
|
48
|
+
yield self
|
55
49
|
end
|
56
50
|
end
|
57
51
|
end
|
data/lib/spec/extensions/main.rb
CHANGED
@@ -16,7 +16,7 @@ module Spec
|
|
16
16
|
# The reason for using different behaviour classes is to have different
|
17
17
|
# matcher methods available from within the <tt>describe</tt> block.
|
18
18
|
#
|
19
|
-
# See Spec::Example::
|
19
|
+
# See Spec::Example::ExampleGroupFactory#register for details about how to
|
20
20
|
# register special implementations.
|
21
21
|
#
|
22
22
|
def describe(*args, &block)
|
@@ -43,7 +43,7 @@ module Test
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
def initialize(defined_description, &implementation)
|
46
|
+
def initialize(defined_description, options={}, &implementation)
|
47
47
|
@_defined_description = defined_description
|
48
48
|
|
49
49
|
# TODO - examples fail in rspec-rails if we remove "|| pending_implementation"
|
@@ -3,8 +3,8 @@ module Spec
|
|
3
3
|
|
4
4
|
class BaseExpectation
|
5
5
|
attr_reader :sym
|
6
|
-
attr_writer :expected_received_count, :method_block, :expected_from
|
7
|
-
protected :expected_received_count=, :method_block=, :expected_from
|
6
|
+
attr_writer :expected_received_count, :method_block, :expected_from
|
7
|
+
protected :expected_received_count=, :method_block=, :expected_from=
|
8
8
|
attr_accessor :error_generator
|
9
9
|
protected :error_generator, :error_generator=
|
10
10
|
|
@@ -35,7 +35,7 @@ module Spec
|
|
35
35
|
new_gen = error_generator.clone
|
36
36
|
new_gen.opts = opts
|
37
37
|
child.error_generator = new_gen
|
38
|
-
child.
|
38
|
+
child.clone_args_to_yield @args_to_yield
|
39
39
|
child
|
40
40
|
end
|
41
41
|
|
@@ -84,6 +84,11 @@ module Spec
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def and_yield(*args)
|
87
|
+
if @args_to_yield_were_cloned
|
88
|
+
@args_to_yield.clear
|
89
|
+
@args_to_yield_were_cloned = false
|
90
|
+
end
|
91
|
+
|
87
92
|
@args_to_yield << args
|
88
93
|
self
|
89
94
|
end
|
@@ -94,6 +99,7 @@ module Spec
|
|
94
99
|
|
95
100
|
def invoke(args, block)
|
96
101
|
if @expected_received_count == 0
|
102
|
+
@failed_fast = true
|
97
103
|
@actual_received_count += 1
|
98
104
|
@error_generator.raise_expectation_error @sym, @expected_received_count, @actual_received_count, *args
|
99
105
|
end
|
@@ -173,6 +179,15 @@ module Spec
|
|
173
179
|
@return_block.call(*args)
|
174
180
|
end
|
175
181
|
end
|
182
|
+
|
183
|
+
def clone_args_to_yield(args)
|
184
|
+
@args_to_yield = args.clone
|
185
|
+
@args_to_yield_were_cloned = true
|
186
|
+
end
|
187
|
+
|
188
|
+
def failed_fast?
|
189
|
+
@failed_fast
|
190
|
+
end
|
176
191
|
end
|
177
192
|
|
178
193
|
class MessageExpectation < BaseExpectation
|
@@ -182,7 +197,7 @@ module Spec
|
|
182
197
|
end
|
183
198
|
|
184
199
|
def verify_messages_received
|
185
|
-
return if expected_messages_received?
|
200
|
+
return if expected_messages_received? || failed_fast?
|
186
201
|
|
187
202
|
generate_error
|
188
203
|
rescue Spec::Mocks::MockExpectationError => error
|
data/lib/spec/mocks/methods.rb
CHANGED
@@ -30,7 +30,7 @@ module Spec
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def as_null_object
|
33
|
-
__mock_proxy.
|
33
|
+
__mock_proxy.as_null_object
|
34
34
|
end
|
35
35
|
|
36
36
|
def null_object?
|
@@ -43,7 +43,7 @@ module Spec
|
|
43
43
|
if Mock === self
|
44
44
|
@mock_proxy ||= Proxy.new(self, @name, @options)
|
45
45
|
else
|
46
|
-
@mock_proxy ||= Proxy.new(self
|
46
|
+
@mock_proxy ||= Proxy.new(self)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
data/lib/spec/mocks/proxy.rb
CHANGED
@@ -15,7 +15,7 @@ module Spec
|
|
15
15
|
$rspec_mocks.add(nil) unless $rspec_mocks.nil?
|
16
16
|
end
|
17
17
|
|
18
|
-
def initialize(target, name, options={})
|
18
|
+
def initialize(target, name=nil, options={})
|
19
19
|
@target = target
|
20
20
|
@name = name
|
21
21
|
@error_generator = ErrorGenerator.new target, name
|
@@ -31,7 +31,7 @@ module Spec
|
|
31
31
|
@options[:null_object]
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
34
|
+
def as_null_object
|
35
35
|
@options[:null_object] = true
|
36
36
|
@target
|
37
37
|
end
|
@@ -87,8 +87,7 @@ module Spec
|
|
87
87
|
expectation = find_matching_expectation(sym, *args)
|
88
88
|
stub = find_matching_method_stub(sym, *args)
|
89
89
|
|
90
|
-
if (stub && expectation && expectation.called_max_times?) ||
|
91
|
-
(stub && !expectation)
|
90
|
+
if (stub && expectation && expectation.called_max_times?) || (stub && !expectation)
|
92
91
|
if expectation = find_almost_matching_expectation(sym, *args)
|
93
92
|
expectation.advise(args, block) unless expectation.expected_messages_received?
|
94
93
|
end
|
@@ -201,7 +200,7 @@ module Spec
|
|
201
200
|
end
|
202
201
|
|
203
202
|
def proxy_for_nil_class?
|
204
|
-
@
|
203
|
+
@target.nil?
|
205
204
|
end
|
206
205
|
|
207
206
|
def reset_nil_expectations_warning
|
data/lib/spec/runner.rb
CHANGED
@@ -185,15 +185,14 @@ module Spec
|
|
185
185
|
end
|
186
186
|
|
187
187
|
def register_at_exit_hook # :nodoc:
|
188
|
-
@
|
189
|
-
unless @spec_runner_at_exit_hook_registered
|
188
|
+
unless @already_registered_at_exit_hook
|
190
189
|
at_exit do
|
191
|
-
unless $! || Spec.run?
|
190
|
+
unless $! || Spec.run? || Spec::Example::ExampleGroupFactory.all_registered?(options.example_groups)
|
192
191
|
success = Spec.run
|
193
192
|
exit success if Spec.exit?
|
194
193
|
end
|
195
194
|
end
|
196
|
-
@
|
195
|
+
@already_registered_at_exit_hook = true
|
197
196
|
end
|
198
197
|
end
|
199
198
|
|
@@ -52,9 +52,9 @@ module Spec
|
|
52
52
|
|
53
53
|
def described_example_group_chain
|
54
54
|
example_group_chain = []
|
55
|
-
example_group.
|
56
|
-
|
57
|
-
example_group_chain <<
|
55
|
+
example_group.__send__(:each_ancestor_example_group_class) do |example_group_class|
|
56
|
+
unless example_group_class.description_args.empty?
|
57
|
+
example_group_chain << example_group_class
|
58
58
|
end
|
59
59
|
end
|
60
60
|
example_group_chain
|
@@ -34,7 +34,7 @@ module Spec
|
|
34
34
|
"an example name directly, causing RSpec to run just the example",
|
35
35
|
"matching that name"],
|
36
36
|
:specification => ["-s", "--specification [NAME]", "DEPRECATED - use -e instead", "(This will be removed when autotest works with -e)"],
|
37
|
-
:line => ["-l", "--line LINE_NUMBER", Integer, "Execute
|
37
|
+
:line => ["-l", "--line LINE_NUMBER", Integer, "Execute behaviour or specification at given line.",
|
38
38
|
"(does not work for dynamically generated specs)"],
|
39
39
|
:format => ["-f", "--format FORMAT[:WHERE]","Specifies what format to use for output. Specify WHERE to tell",
|
40
40
|
"the formatter where to write the output. All built-in formats",
|
@@ -94,30 +94,31 @@ module Spec
|
|
94
94
|
|
95
95
|
self.banner = "Usage: spec (FILE|DIRECTORY|GLOB)+ [options]"
|
96
96
|
self.separator ""
|
97
|
-
on(*OPTIONS[:pattern])
|
98
|
-
on(*OPTIONS[:diff])
|
99
|
-
on(*OPTIONS[:colour])
|
100
|
-
on(*OPTIONS[:example])
|
101
|
-
on(*OPTIONS[:specification])
|
102
|
-
on(*OPTIONS[:line])
|
103
|
-
on(*OPTIONS[:format])
|
104
|
-
on(*OPTIONS[:require])
|
105
|
-
on(*OPTIONS[:backtrace])
|
106
|
-
on(*OPTIONS[:loadby])
|
107
|
-
on(*OPTIONS[:reverse])
|
108
|
-
on(*OPTIONS[:timeout])
|
109
|
-
on(*OPTIONS[:heckle])
|
110
|
-
on(*OPTIONS[:dry_run])
|
111
|
-
on(*OPTIONS[:options_file])
|
97
|
+
on(*OPTIONS[:pattern]) {|pattern| @options.filename_pattern = pattern}
|
98
|
+
on(*OPTIONS[:diff]) {|diff| @options.parse_diff(diff)}
|
99
|
+
on(*OPTIONS[:colour]) {@options.colour = true}
|
100
|
+
on(*OPTIONS[:example]) {|example| @options.parse_example(example)}
|
101
|
+
on(*OPTIONS[:specification]) {|example| @options.parse_example(example)}
|
102
|
+
on(*OPTIONS[:line]) {|line_number| @options.line_number = line_number.to_i}
|
103
|
+
on(*OPTIONS[:format]) {|format| @options.parse_format(format)}
|
104
|
+
on(*OPTIONS[:require]) {|requires| invoke_requires(requires)}
|
105
|
+
on(*OPTIONS[:backtrace]) {@options.backtrace_tweaker = NoisyBacktraceTweaker.new}
|
106
|
+
on(*OPTIONS[:loadby]) {|loadby| @options.loadby = loadby}
|
107
|
+
on(*OPTIONS[:reverse]) {@options.reverse = true}
|
108
|
+
on(*OPTIONS[:timeout]) {|timeout| @options.timeout = timeout.to_f}
|
109
|
+
on(*OPTIONS[:heckle]) {|heckle| @options.load_heckle_runner(heckle)}
|
110
|
+
on(*OPTIONS[:dry_run]) {@options.dry_run = true}
|
111
|
+
on(*OPTIONS[:options_file]) {|options_file| parse_options_file(options_file)}
|
112
112
|
on(*OPTIONS[:generate_options]) {|options_file|}
|
113
|
-
on(*OPTIONS[:runner])
|
114
|
-
on(*OPTIONS[:drb])
|
115
|
-
on(*OPTIONS[:version])
|
116
|
-
on_tail(*OPTIONS[:help])
|
113
|
+
on(*OPTIONS[:runner]) {|runner| @options.user_input_for_runner = runner}
|
114
|
+
on(*OPTIONS[:drb]) {}
|
115
|
+
on(*OPTIONS[:version]) {parse_version}
|
116
|
+
on_tail(*OPTIONS[:help]) {parse_help}
|
117
117
|
end
|
118
118
|
|
119
119
|
def order!(argv, &blk)
|
120
|
-
@argv = argv
|
120
|
+
@argv = argv.dup
|
121
|
+
@argv = (@argv.empty? && Spec.spec_command?) ? ['--help'] : @argv
|
121
122
|
@options.argv = @argv.dup
|
122
123
|
return if parse_generate_options
|
123
124
|
return if parse_drb
|
@@ -129,7 +130,7 @@ module Spec
|
|
129
130
|
|
130
131
|
@options
|
131
132
|
end
|
132
|
-
|
133
|
+
|
133
134
|
protected
|
134
135
|
def invoke_requires(requires)
|
135
136
|
requires.split(",").each do |file|
|
data/lib/spec/version.rb
CHANGED
data/rspec.gemspec
CHANGED
@@ -1,33 +1,44 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = %q{rspec}
|
3
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.9"
|
4
6
|
|
5
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
8
|
s.authors = ["RSpec Development Team"]
|
7
|
-
s.date = %q{2008-10-
|
9
|
+
s.date = %q{2008-10-20}
|
8
10
|
s.description = %q{Behaviour Driven Development for Ruby.}
|
9
11
|
s.email = ["rspec-devel@rubyforge.org"]
|
10
12
|
s.executables = ["autospec", "spec"]
|
11
|
-
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/pure/priority.txt", "examples/stories/game-of-life/README.txt", "examples/stories/game-of-life/behaviour/stories/stories.txt", "failing_examples/README.txt", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt"]
|
12
|
-
s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "examples/pure/autogenerated_docstrings_example.rb", "examples/pure/before_and_after_example.rb", "examples/pure/behave_as_example.rb", "examples/pure/custom_expectation_matchers.rb", "examples/pure/custom_formatter.rb", "examples/pure/dynamic_spec.rb", "examples/pure/file_accessor.rb", "examples/pure/file_accessor_spec.rb", "examples/pure/greeter_spec.rb", "examples/pure/helper_method_example.rb", "examples/pure/io_processor.rb", "examples/pure/io_processor_spec.rb", "examples/pure/legacy_spec.rb", "examples/pure/mocking_example.rb", "examples/pure/multi_threaded_behaviour_runner.rb", "examples/pure/nested_classes_example.rb", "examples/pure/partial_mock_example.rb", "examples/pure/pending_example.rb", "examples/pure/predicate_example.rb", "examples/pure/priority.txt", "examples/pure/shared_example_group_example.rb", "examples/pure/shared_stack_examples.rb", "examples/pure/spec_helper.rb", "examples/pure/stack.rb", "examples/pure/stack_spec.rb", "examples/pure/stack_spec_with_nested_example_groups.rb", "examples/pure/stubbing_example.rb", "examples/pure/yielding_example.rb", "examples/stories/adder.rb", "examples/stories/addition", "examples/stories/addition.rb", "examples/stories/calculator.rb", "examples/stories/game-of-life/.loadpath", "examples/stories/game-of-life/README.txt", "examples/stories/game-of-life/behaviour/everything.rb", "examples/stories/game-of-life/behaviour/examples/examples.rb", "examples/stories/game-of-life/behaviour/examples/game_behaviour.rb", "examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb", "examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story", "examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story", "examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story", "examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story", "examples/stories/game-of-life/behaviour/stories/ICanKillACell.story", "examples/stories/game-of-life/behaviour/stories/TheGridWraps.story", "examples/stories/game-of-life/behaviour/stories/create_a_cell.rb", "examples/stories/game-of-life/behaviour/stories/helper.rb", "examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb", "examples/stories/game-of-life/behaviour/stories/steps.rb", "examples/stories/game-of-life/behaviour/stories/stories.rb", "examples/stories/game-of-life/behaviour/stories/stories.txt", "examples/stories/game-of-life/life.rb", "examples/stories/game-of-life/life/game.rb", "examples/stories/game-of-life/life/grid.rb", "examples/stories/helper.rb", "examples/stories/steps/addition_steps.rb", "failing_examples/README.txt", "failing_examples/diffing_spec.rb", "failing_examples/failing_autogenerated_docstrings_example.rb", "failing_examples/failure_in_setup.rb", "failing_examples/failure_in_teardown.rb", "failing_examples/mocking_example.rb", "failing_examples/mocking_with_flexmock.rb", "failing_examples/mocking_with_mocha.rb", "failing_examples/mocking_with_rr.rb", "failing_examples/partial_mock_example.rb", "failing_examples/predicate_example.rb", "failing_examples/raising_example.rb", "failing_examples/spec_helper.rb", "failing_examples/syntax_error_example.rb", "failing_examples/team_spec.rb", "failing_examples/timeout_behaviour.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/adapters.rb", "lib/spec/adapters/ruby_engine.rb", "lib/spec/adapters/ruby_engine/mri.rb", "lib/spec/adapters/ruby_engine/rubinius.rb", "lib/spec/example.rb", "lib/spec/example/configuration.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_inclusion_warnings.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/extensions.rb", "lib/spec/extensions/class.rb", "lib/spec/extensions/main.rb", "lib/spec/extensions/metaclass.rb", "lib/spec/extensions/object.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/exist.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.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/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/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/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", "plugins/mock_frameworks/flexmock.rb", "plugins/mock_frameworks/mocha.rb", "plugins/mock_frameworks/rr.rb", "plugins/mock_frameworks/rspec.rb", "rake_tasks/examples.rake", "rake_tasks/examples_with_rcov.rake", "rake_tasks/failing_examples_with_html.rake", "rake_tasks/verify_rcov.rake", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/adapters/ruby_engine_spec.rb", "spec/spec/example/configuration_spec.rb", "spec/spec/example/example_group/described_module_spec.rb", "spec/spec/example/example_group/warning_messages_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/example_runner_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/extensions/main_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/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_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_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/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/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/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_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_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/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/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/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", "stories/all.rb", "stories/configuration/before_blocks.story", "stories/configuration/stories.rb", "stories/example_groups/autogenerated_docstrings", "stories/example_groups/example_group_with_should_methods", "stories/example_groups/nested_groups", "stories/example_groups/output", "stories/example_groups/stories.rb", "stories/helper.rb", "stories/interop/examples_and_tests_together", "stories/interop/stories.rb", "stories/interop/test_case_with_should_methods", "stories/mock_framework_integration/stories.rb", "stories/mock_framework_integration/use_flexmock.story", "stories/pending_stories/README", "stories/resources/helpers/cmdline.rb", "stories/resources/helpers/story_helper.rb", "stories/resources/matchers/smart_match.rb", "stories/resources/spec/before_blocks_example.rb", "stories/resources/spec/example_group_with_should_methods.rb", "stories/resources/spec/simple_spec.rb", "stories/resources/spec/spec_with_flexmock.rb", "stories/resources/steps/running_rspec.rb", "stories/resources/stories/failing_story.rb", "stories/resources/test/spec_and_test_together.rb", "stories/resources/test/test_case_with_should_methods.rb", "stories/stories/multiline_steps.story", "stories/stories/steps/multiline_steps.rb", "stories/stories/stories.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"]
|
13
|
+
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/pure/priority.txt", "examples/stories/game-of-life/README.txt", "examples/stories/game-of-life/behaviour/stories/stories.txt", "failing_examples/README.txt", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt"]
|
14
|
+
s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "examples/pure/autogenerated_docstrings_example.rb", "examples/pure/before_and_after_example.rb", "examples/pure/behave_as_example.rb", "examples/pure/custom_expectation_matchers.rb", "examples/pure/custom_formatter.rb", "examples/pure/dynamic_spec.rb", "examples/pure/file_accessor.rb", "examples/pure/file_accessor_spec.rb", "examples/pure/greeter_spec.rb", "examples/pure/helper_method_example.rb", "examples/pure/io_processor.rb", "examples/pure/io_processor_spec.rb", "examples/pure/legacy_spec.rb", "examples/pure/mocking_example.rb", "examples/pure/multi_threaded_behaviour_runner.rb", "examples/pure/nested_classes_example.rb", "examples/pure/partial_mock_example.rb", "examples/pure/pending_example.rb", "examples/pure/predicate_example.rb", "examples/pure/priority.txt", "examples/pure/shared_example_group_example.rb", "examples/pure/shared_stack_examples.rb", "examples/pure/spec_helper.rb", "examples/pure/stack.rb", "examples/pure/stack_spec.rb", "examples/pure/stack_spec_with_nested_example_groups.rb", "examples/pure/stubbing_example.rb", "examples/pure/yielding_example.rb", "examples/stories/adder.rb", "examples/stories/addition", "examples/stories/addition.rb", "examples/stories/calculator.rb", "examples/stories/game-of-life/.loadpath", "examples/stories/game-of-life/README.txt", "examples/stories/game-of-life/behaviour/everything.rb", "examples/stories/game-of-life/behaviour/examples/examples.rb", "examples/stories/game-of-life/behaviour/examples/game_behaviour.rb", "examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb", "examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story", "examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story", "examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story", "examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story", "examples/stories/game-of-life/behaviour/stories/ICanKillACell.story", "examples/stories/game-of-life/behaviour/stories/TheGridWraps.story", "examples/stories/game-of-life/behaviour/stories/create_a_cell.rb", "examples/stories/game-of-life/behaviour/stories/helper.rb", "examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb", "examples/stories/game-of-life/behaviour/stories/steps.rb", "examples/stories/game-of-life/behaviour/stories/stories.rb", "examples/stories/game-of-life/behaviour/stories/stories.txt", "examples/stories/game-of-life/life.rb", "examples/stories/game-of-life/life/game.rb", "examples/stories/game-of-life/life/grid.rb", "examples/stories/helper.rb", "examples/stories/steps/addition_steps.rb", "failing_examples/README.txt", "failing_examples/diffing_spec.rb", "failing_examples/failing_autogenerated_docstrings_example.rb", "failing_examples/failure_in_setup.rb", "failing_examples/failure_in_teardown.rb", "failing_examples/mocking_example.rb", "failing_examples/mocking_with_flexmock.rb", "failing_examples/mocking_with_mocha.rb", "failing_examples/mocking_with_rr.rb", "failing_examples/partial_mock_example.rb", "failing_examples/predicate_example.rb", "failing_examples/raising_example.rb", "failing_examples/spec_helper.rb", "failing_examples/syntax_error_example.rb", "failing_examples/team_spec.rb", "failing_examples/timeout_behaviour.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/adapters.rb", "lib/spec/adapters/ruby_engine.rb", "lib/spec/adapters/ruby_engine/mri.rb", "lib/spec/adapters/ruby_engine/rubinius.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/configuration.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/extensions.rb", "lib/spec/extensions/class.rb", "lib/spec/extensions/main.rb", "lib/spec/extensions/metaclass.rb", "lib/spec/extensions/object.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/exist.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.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/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/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/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", "plugins/mock_frameworks/flexmock.rb", "plugins/mock_frameworks/mocha.rb", "plugins/mock_frameworks/rr.rb", "plugins/mock_frameworks/rspec.rb", "rake_tasks/examples.rake", "rake_tasks/examples_with_rcov.rake", "rake_tasks/failing_examples_with_html.rake", "rake_tasks/verify_rcov.rake", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/adapters/ruby_engine_spec.rb", "spec/spec/example/configuration_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/example_runner_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/extensions/main_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_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_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/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/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/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_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_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/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/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/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", "stories/all.rb", "stories/configuration/before_blocks.story", "stories/configuration/stories.rb", "stories/example_groups/autogenerated_docstrings", "stories/example_groups/example_group_with_should_methods", "stories/example_groups/nested_groups", "stories/example_groups/output", "stories/example_groups/stories.rb", "stories/helper.rb", "stories/interop/examples_and_tests_together", "stories/interop/stories.rb", "stories/interop/test_case_with_should_methods", "stories/mock_framework_integration/stories.rb", "stories/mock_framework_integration/use_flexmock.story", "stories/pending_stories/README", "stories/resources/helpers/cmdline.rb", "stories/resources/helpers/story_helper.rb", "stories/resources/matchers/smart_match.rb", "stories/resources/spec/before_blocks_example.rb", "stories/resources/spec/example_group_with_should_methods.rb", "stories/resources/spec/simple_spec.rb", "stories/resources/spec/spec_with_flexmock.rb", "stories/resources/steps/running_rspec.rb", "stories/resources/stories/failing_story.rb", "stories/resources/test/spec_and_test_together.rb", "stories/resources/test/test_case_with_should_methods.rb", "stories/stories/multiline_steps.story", "stories/stories/steps/multiline_steps.rb", "stories/stories/stories.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"]
|
13
15
|
s.has_rdoc = true
|
14
16
|
s.homepage = %q{http://rspec.info/}
|
15
17
|
s.rdoc_options = ["--main", "README.txt"]
|
16
18
|
s.require_paths = ["lib"]
|
17
19
|
s.rubyforge_project = %q{rspec}
|
18
20
|
s.rubygems_version = %q{1.3.0}
|
19
|
-
s.summary = %q{rspec 1.1.
|
21
|
+
s.summary = %q{rspec 1.1.9}
|
20
22
|
|
21
23
|
if s.respond_to? :specification_version then
|
22
24
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
25
|
s.specification_version = 2
|
24
26
|
|
25
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
-
s.add_development_dependency(%q<
|
28
|
+
s.add_development_dependency(%q<diff-lcs>, [">= 0"])
|
29
|
+
s.add_development_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
|
30
|
+
s.add_development_dependency(%q<syntax>, [">= 0"])
|
31
|
+
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
27
32
|
else
|
28
|
-
s.add_dependency(%q<
|
33
|
+
s.add_dependency(%q<diff-lcs>, [">= 0"])
|
34
|
+
s.add_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
|
35
|
+
s.add_dependency(%q<syntax>, [">= 0"])
|
36
|
+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
29
37
|
end
|
30
38
|
else
|
31
|
-
s.add_dependency(%q<
|
39
|
+
s.add_dependency(%q<diff-lcs>, [">= 0"])
|
40
|
+
s.add_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
|
41
|
+
s.add_dependency(%q<syntax>, [">= 0"])
|
42
|
+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
32
43
|
end
|
33
44
|
end
|
data/spec/autotest/rspec_spec.rb
CHANGED
@@ -96,7 +96,11 @@ HERE
|
|
96
96
|
@rspec_autotest.should map_specs([@spec_file]).to(@spec_file)
|
97
97
|
end
|
98
98
|
|
99
|
-
it "should
|
99
|
+
it "should ignore files in spec dir that aren't specs" do
|
100
|
+
@rspec_autotest.should map_specs([]).to("spec/spec_helper.rb")
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should ignore untracked files (in @file)" do
|
100
104
|
@rspec_autotest.should map_specs([]).to("lib/untracked_file")
|
101
105
|
end
|
102
106
|
end
|
@@ -2,279 +2,293 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
|
2
2
|
|
3
3
|
module Spec
|
4
4
|
module Example
|
5
|
-
|
6
5
|
describe Configuration do
|
7
|
-
|
8
|
-
@config = Configuration.new
|
9
|
-
@example_group = mock("example_group")
|
10
|
-
end
|
11
|
-
|
6
|
+
|
12
7
|
describe "#mock_with" do
|
13
8
|
|
9
|
+
before(:each) do
|
10
|
+
@config = Configuration.new
|
11
|
+
@example_group = mock("example_group")
|
12
|
+
end
|
13
|
+
|
14
14
|
it "should default mock framework to rspec" do
|
15
15
|
@config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rspec$/
|
16
16
|
end
|
17
17
|
|
18
|
-
it "should
|
18
|
+
it "should set rspec mocking explicitly" do
|
19
19
|
@config.mock_with(:rspec)
|
20
20
|
@config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rspec$/
|
21
21
|
end
|
22
22
|
|
23
|
-
it "should
|
23
|
+
it "should set mocha" do
|
24
24
|
@config.mock_with(:mocha)
|
25
25
|
@config.mock_framework.should =~ /\/plugins\/mock_frameworks\/mocha$/
|
26
26
|
end
|
27
27
|
|
28
|
-
it "should
|
28
|
+
it "should set flexmock" do
|
29
29
|
@config.mock_with(:flexmock)
|
30
30
|
@config.mock_framework.should =~ /\/plugins\/mock_frameworks\/flexmock$/
|
31
31
|
end
|
32
32
|
|
33
|
-
it "should
|
33
|
+
it "should set rr" do
|
34
34
|
@config.mock_with(:rr)
|
35
35
|
@config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rr$/
|
36
36
|
end
|
37
37
|
|
38
|
-
it "should
|
38
|
+
it "should set an arbitrary adapter module" do
|
39
39
|
adapter = Module.new
|
40
40
|
@config.mock_with(adapter)
|
41
41
|
@config.mock_framework.should == adapter
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
with_sandboxed_config do
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
class << self
|
53
|
-
def this_class_has_special_methods
|
54
|
-
end
|
55
|
-
end
|
47
|
+
describe "#include" do
|
48
|
+
|
49
|
+
before(:each) do
|
50
|
+
@example_group_class = Class.new(ExampleGroup) {}
|
51
|
+
ExampleGroupFactory.register(:foobar, @example_group_class)
|
56
52
|
end
|
57
|
-
ExampleGroupFactory.register(:foobar, @example_group_class)
|
58
|
-
end
|
59
53
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
54
|
+
it "should include the submitted module in ExampleGroup subclasses" do
|
55
|
+
mod = Module.new
|
56
|
+
config.include mod
|
57
|
+
Class.new(@example_group_class).included_modules.should include(mod)
|
58
|
+
end
|
65
59
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
60
|
+
it "should scope modules to be included for a specific type" do
|
61
|
+
mod = Module.new
|
62
|
+
config.include mod, :type => :foobar
|
63
|
+
Class.new(@example_group_class).included_modules.should include(mod)
|
64
|
+
end
|
71
65
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
66
|
+
it "should not include modules in a type they are not intended for" do
|
67
|
+
mod = Module.new
|
68
|
+
@other_example_group_class = Class.new(ExampleGroup)
|
69
|
+
ExampleGroupFactory.register(:baz, @other_example_group_class)
|
77
70
|
|
78
|
-
|
79
|
-
mod = Module.new
|
80
|
-
@other_example_group_class = Class.new(ExampleGroup)
|
81
|
-
ExampleGroupFactory.register(:baz, @other_example_group_class)
|
71
|
+
config.include mod, :type => :foobar
|
82
72
|
|
83
|
-
|
73
|
+
Class.new(@other_example_group_class).included_modules.should_not include(mod)
|
74
|
+
end
|
84
75
|
|
85
|
-
Class.new(@other_example_group_class).included_modules.should_not include(mod)
|
86
76
|
end
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
|
-
describe Configuration do
|
93
77
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
ExampleGroupFactory.register(:special, @special_example_group)
|
100
|
-
ExampleGroupFactory.register(:special_child, @special_child_example_group)
|
101
|
-
ExampleGroupFactory.register(:non_special, @nonspecial_example_group)
|
102
|
-
@example_group = @special_child_example_group.describe "Special Example Group"
|
103
|
-
@unselected_example_group = Class.new(@nonspecial_example_group).describe "Non Special Example Group"
|
104
|
-
end
|
105
|
-
|
106
|
-
after(:each) do
|
107
|
-
ExampleGroupFactory.reset
|
108
|
-
end
|
109
|
-
|
110
|
-
describe "#prepend_before" do
|
111
|
-
it "prepends the before block on all instances of the passed in type" do
|
112
|
-
order = []
|
113
|
-
@config.prepend_before(:all) do
|
114
|
-
order << :prepend__before_all
|
115
|
-
end
|
116
|
-
@config.prepend_before(:all, :type => :special) do
|
117
|
-
order << :special_prepend__before_all
|
118
|
-
end
|
119
|
-
@config.prepend_before(:all, :type => :special_child) do
|
120
|
-
order << :special_child_prepend__before_all
|
121
|
-
end
|
122
|
-
@config.prepend_before(:each) do
|
123
|
-
order << :prepend__before_each
|
124
|
-
end
|
125
|
-
@config.prepend_before(:each, :type => :special) do
|
126
|
-
order << :special_prepend__before_each
|
127
|
-
end
|
128
|
-
@config.prepend_before(:each, :type => :special_child) do
|
129
|
-
order << :special_child_prepend__before_each
|
78
|
+
describe "#extend" do
|
79
|
+
|
80
|
+
before(:each) do
|
81
|
+
@example_group_class = Class.new(ExampleGroup) {}
|
82
|
+
ExampleGroupFactory.register(:foobar, @example_group_class)
|
130
83
|
end
|
131
|
-
|
132
|
-
|
84
|
+
|
85
|
+
it "should extend all groups" do
|
86
|
+
mod = Module.new
|
87
|
+
ExampleGroup.should_receive(:extend).with(mod)
|
88
|
+
Spec::Runner.configuration.extend mod
|
133
89
|
end
|
134
|
-
|
135
|
-
|
90
|
+
|
91
|
+
it "should extend specified groups" do
|
92
|
+
mod = Module.new
|
93
|
+
@example_group_class.should_receive(:extend).with(mod)
|
94
|
+
Spec::Runner.configuration.extend mod, :type => :foobar
|
136
95
|
end
|
137
|
-
|
96
|
+
|
97
|
+
it "should not extend non-specified groups" do
|
98
|
+
@other_example_group_class = Class.new(ExampleGroup)
|
99
|
+
ExampleGroupFactory.register(:baz, @other_example_group_class)
|
100
|
+
|
101
|
+
mod = Module.new
|
102
|
+
@other_example_group_class.should_not_receive(:extend)
|
103
|
+
|
104
|
+
Spec::Runner.configuration.extend mod, :type => :foobar
|
138
105
|
end
|
139
106
|
|
140
|
-
@example_group.run
|
141
|
-
order.should == [
|
142
|
-
:prepend__before_all,
|
143
|
-
:special_prepend__before_all,
|
144
|
-
:special_child_prepend__before_all,
|
145
|
-
:prepend__before_each,
|
146
|
-
:special_prepend__before_each,
|
147
|
-
:special_child_prepend__before_each
|
148
|
-
]
|
149
107
|
end
|
150
108
|
end
|
151
109
|
|
152
|
-
describe
|
110
|
+
describe Configuration do
|
111
|
+
|
112
|
+
before(:each) do
|
113
|
+
@special_example_group = Class.new(ExampleGroup).describe("special_example_group")
|
114
|
+
@special_child_example_group = Class.new(@special_example_group).describe("special_child_example_group")
|
115
|
+
@nonspecial_example_group = Class.new(ExampleGroup).describe("nonspecial_example_group")
|
116
|
+
ExampleGroupFactory.register(:special, @special_example_group)
|
117
|
+
ExampleGroupFactory.register(:special_child, @special_child_example_group)
|
118
|
+
ExampleGroupFactory.register(:non_special, @nonspecial_example_group)
|
119
|
+
@example_group = @special_child_example_group.describe "Special Example Group"
|
120
|
+
@unselected_example_group = Class.new(@nonspecial_example_group).describe "Non Special Example Group"
|
121
|
+
end
|
153
122
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
123
|
+
describe "#prepend_before" do
|
124
|
+
it "prepends the before block on all instances of the passed in type" do
|
125
|
+
order = []
|
126
|
+
config.prepend_before(:all) do
|
127
|
+
order << :prepend__before_all
|
128
|
+
end
|
129
|
+
config.prepend_before(:all, :type => :special) do
|
130
|
+
order << :special_prepend__before_all
|
131
|
+
end
|
132
|
+
config.prepend_before(:all, :type => :special_child) do
|
133
|
+
order << :special_child_prepend__before_all
|
134
|
+
end
|
135
|
+
config.prepend_before(:each) do
|
136
|
+
order << :prepend__before_each
|
137
|
+
end
|
138
|
+
config.prepend_before(:each, :type => :special) do
|
139
|
+
order << :special_prepend__before_each
|
140
|
+
end
|
141
|
+
config.prepend_before(:each, :type => :special_child) do
|
142
|
+
order << :special_child_prepend__before_each
|
143
|
+
end
|
144
|
+
config.prepend_before(:all, :type => :non_special) do
|
145
|
+
order << :special_prepend__before_all
|
146
|
+
end
|
147
|
+
config.prepend_before(:each, :type => :non_special) do
|
148
|
+
order << :special_prepend__before_each
|
149
|
+
end
|
150
|
+
@example_group.it "calls prepend_before" do
|
151
|
+
end
|
152
|
+
|
153
|
+
@example_group.run
|
154
|
+
order.should == [
|
155
|
+
:prepend__before_all,
|
156
|
+
:special_prepend__before_all,
|
157
|
+
:special_child_prepend__before_all,
|
158
|
+
:prepend__before_each,
|
159
|
+
:special_prepend__before_each,
|
160
|
+
:special_child_prepend__before_each
|
161
|
+
]
|
181
162
|
end
|
182
|
-
|
183
|
-
@example_group.run
|
184
|
-
order.should == [
|
185
|
-
:append_before_all,
|
186
|
-
:special_append_before_all,
|
187
|
-
:special_child_append_before_all,
|
188
|
-
:append_before_each,
|
189
|
-
:special_append_before_each,
|
190
|
-
:special_child_append_before_each
|
191
|
-
]
|
192
163
|
end
|
193
|
-
end
|
194
164
|
|
195
|
-
|
165
|
+
describe "#append_before" do
|
196
166
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
167
|
+
it "calls append_before on the type" do
|
168
|
+
order = []
|
169
|
+
config.append_before(:all) do
|
170
|
+
order << :append_before_all
|
171
|
+
end
|
172
|
+
config.append_before(:all, :type => :special) do
|
173
|
+
order << :special_append_before_all
|
174
|
+
end
|
175
|
+
config.append_before(:all, :type => :special_child) do
|
176
|
+
order << :special_child_append_before_all
|
177
|
+
end
|
178
|
+
config.append_before(:each) do
|
179
|
+
order << :append_before_each
|
180
|
+
end
|
181
|
+
config.append_before(:each, :type => :special) do
|
182
|
+
order << :special_append_before_each
|
183
|
+
end
|
184
|
+
config.append_before(:each, :type => :special_child) do
|
185
|
+
order << :special_child_append_before_each
|
186
|
+
end
|
187
|
+
config.append_before(:all, :type => :non_special) do
|
188
|
+
order << :special_append_before_all
|
189
|
+
end
|
190
|
+
config.append_before(:each, :type => :non_special) do
|
191
|
+
order << :special_append_before_each
|
192
|
+
end
|
193
|
+
@example_group.it "calls append_before" do
|
194
|
+
end
|
225
195
|
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
196
|
+
@example_group.run
|
197
|
+
order.should == [
|
198
|
+
:append_before_all,
|
199
|
+
:special_append_before_all,
|
200
|
+
:special_child_append_before_all,
|
201
|
+
:append_before_each,
|
202
|
+
:special_append_before_each,
|
203
|
+
:special_child_append_before_each
|
204
|
+
]
|
205
|
+
end
|
235
206
|
end
|
236
|
-
end
|
237
207
|
|
238
|
-
|
208
|
+
describe "#prepend_after" do
|
239
209
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
210
|
+
it "prepends the after block on all instances of the passed in type" do
|
211
|
+
order = []
|
212
|
+
config.prepend_after(:all) do
|
213
|
+
order << :prepend__after_all
|
214
|
+
end
|
215
|
+
config.prepend_after(:all, :type => :special) do
|
216
|
+
order << :special_prepend__after_all
|
217
|
+
end
|
218
|
+
config.prepend_after(:all, :type => :special) do
|
219
|
+
order << :special_child_prepend__after_all
|
220
|
+
end
|
221
|
+
config.prepend_after(:each) do
|
222
|
+
order << :prepend__after_each
|
223
|
+
end
|
224
|
+
config.prepend_after(:each, :type => :special) do
|
225
|
+
order << :special_prepend__after_each
|
226
|
+
end
|
227
|
+
config.prepend_after(:each, :type => :special) do
|
228
|
+
order << :special_child_prepend__after_each
|
229
|
+
end
|
230
|
+
config.prepend_after(:all, :type => :non_special) do
|
231
|
+
order << :special_prepend__after_all
|
232
|
+
end
|
233
|
+
config.prepend_after(:each, :type => :non_special) do
|
234
|
+
order << :special_prepend__after_each
|
235
|
+
end
|
236
|
+
@example_group.it "calls prepend_after" do
|
237
|
+
end
|
238
|
+
|
239
|
+
@example_group.run
|
240
|
+
order.should == [
|
241
|
+
:special_child_prepend__after_each,
|
242
|
+
:special_prepend__after_each,
|
243
|
+
:prepend__after_each,
|
244
|
+
:special_child_prepend__after_all,
|
245
|
+
:special_prepend__after_all,
|
246
|
+
:prepend__after_all
|
247
|
+
]
|
267
248
|
end
|
249
|
+
end
|
250
|
+
|
251
|
+
describe "#append_after" do
|
268
252
|
|
269
|
-
|
270
|
-
|
271
|
-
:
|
272
|
-
|
273
|
-
|
274
|
-
:
|
275
|
-
|
276
|
-
|
277
|
-
|
253
|
+
it "calls append_after on the type" do
|
254
|
+
order = []
|
255
|
+
config.append_after(:all) do
|
256
|
+
order << :append__after_all
|
257
|
+
end
|
258
|
+
config.append_after(:all, :type => :special) do
|
259
|
+
order << :special_append__after_all
|
260
|
+
end
|
261
|
+
config.append_after(:all, :type => :special_child) do
|
262
|
+
order << :special_child_append__after_all
|
263
|
+
end
|
264
|
+
config.append_after(:each) do
|
265
|
+
order << :append__after_each
|
266
|
+
end
|
267
|
+
config.append_after(:each, :type => :special) do
|
268
|
+
order << :special_append__after_each
|
269
|
+
end
|
270
|
+
config.append_after(:each, :type => :special_child) do
|
271
|
+
order << :special_child_append__after_each
|
272
|
+
end
|
273
|
+
config.append_after(:all, :type => :non_special) do
|
274
|
+
order << :non_special_append_after_all
|
275
|
+
end
|
276
|
+
config.append_after(:each, :type => :non_special) do
|
277
|
+
order << :non_special_append_after_each
|
278
|
+
end
|
279
|
+
@example_group.it "calls append_after" do
|
280
|
+
end
|
281
|
+
|
282
|
+
@example_group.run
|
283
|
+
order.should == [
|
284
|
+
:special_child_append__after_each,
|
285
|
+
:special_append__after_each,
|
286
|
+
:append__after_each,
|
287
|
+
:special_child_append__after_all,
|
288
|
+
:special_append__after_all,
|
289
|
+
:append__after_all
|
290
|
+
]
|
291
|
+
end
|
278
292
|
end
|
279
293
|
end
|
280
294
|
end
|