rspec 0.9.4 → 1.0.0

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.
Files changed (59) hide show
  1. data/CHANGES +24 -0
  2. data/EXAMPLES.rd +6 -2
  3. data/README +9 -9
  4. data/Rakefile +32 -29
  5. data/examples/not_yet_implemented_spec.rb +12 -0
  6. data/examples/shared_behaviours_example.rb +8 -0
  7. data/examples/stack_spec.rb +1 -0
  8. data/lib/spec/dsl/behaviour.rb +21 -6
  9. data/lib/spec/dsl/behaviour_callbacks.rb +44 -26
  10. data/lib/spec/dsl/behaviour_eval.rb +21 -12
  11. data/lib/spec/dsl/behaviour_factory.rb +23 -13
  12. data/lib/spec/dsl/configuration.rb +85 -5
  13. data/lib/spec/dsl/description.rb +14 -6
  14. data/lib/spec/dsl/example.rb +2 -2
  15. data/lib/spec/matchers.rb +5 -5
  16. data/lib/spec/matchers/be.rb +16 -0
  17. data/lib/spec/matchers/operator_matcher.rb +21 -1
  18. data/lib/spec/matchers/raise_error.rb +1 -1
  19. data/lib/spec/rake/verify_rcov.rb +5 -1
  20. data/lib/spec/runner.rb +7 -27
  21. data/lib/spec/runner/behaviour_runner.rb +1 -1
  22. data/lib/spec/runner/extensions/kernel.rb +20 -0
  23. data/lib/spec/runner/formatter/base_formatter.rb +6 -1
  24. data/lib/spec/runner/formatter/base_text_formatter.rb +10 -2
  25. data/lib/spec/runner/formatter/failing_behaviours_formatter.rb +1 -1
  26. data/lib/spec/runner/formatter/failing_examples_formatter.rb +1 -1
  27. data/lib/spec/runner/formatter/html_formatter.rb +63 -31
  28. data/lib/spec/runner/formatter/progress_bar_formatter.rb +5 -0
  29. data/lib/spec/runner/formatter/rdoc_formatter.rb +4 -0
  30. data/lib/spec/runner/formatter/specdoc_formatter.rb +6 -1
  31. data/lib/spec/runner/option_parser.rb +1 -1
  32. data/lib/spec/runner/reporter.rb +13 -4
  33. data/lib/spec/runner/spec_parser.rb +1 -1
  34. data/lib/spec/version.rb +5 -5
  35. data/spec/spec/dsl/behaviour_spec.rb +88 -24
  36. data/spec/spec/dsl/configuration_spec.rb +8 -1
  37. data/spec/spec/dsl/example_class_spec.rb +1 -1
  38. data/spec/spec/dsl/example_instance_spec.rb +5 -5
  39. data/spec/spec/dsl/shared_behaviour_spec.rb +24 -2
  40. data/spec/spec/matchers/be_spec.rb +20 -2
  41. data/spec/spec/matchers/operator_matcher_spec.rb +158 -0
  42. data/spec/spec/runner/command_line_spec.rb +5 -4
  43. data/spec/spec/runner/drb_command_line_spec.rb +15 -8
  44. data/spec/spec/runner/formatter/html_formatter_spec.rb +22 -5
  45. data/spec/spec/runner/formatter/progress_bar_formatter_dry_run_spec.rb +1 -1
  46. data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +7 -2
  47. data/spec/spec/runner/formatter/rdoc_formatter_dry_run_spec.rb +1 -1
  48. data/spec/spec/runner/formatter/rdoc_formatter_spec.rb +6 -1
  49. data/spec/spec/runner/formatter/specdoc_formatter_dry_run_spec.rb +1 -1
  50. data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +15 -5
  51. data/spec/spec/runner/option_parser_spec.rb +5 -0
  52. data/spec/spec/runner/reporter_spec.rb +23 -5
  53. data/spec/spec/runner/spec_matcher_spec.rb +1 -1
  54. data/spec/spec/runner/spec_parser_spec.rb +1 -1
  55. data/spec/spec_helper.rb +38 -2
  56. metadata +41 -42
  57. data/spec/spec/matchers/should_===_spec.rb +0 -38
  58. data/spec/spec/matchers/should_==_spec.rb +0 -37
  59. data/spec/spec/matchers/should_=~_spec.rb +0 -36
@@ -14,10 +14,15 @@ module Spec
14
14
  @io.string.should eql("\n")
15
15
  end
16
16
 
17
- it "should produce standard summary" do
18
- @formatter.dump_summary(3, 2, 1)
17
+ it "should produce standard summary without not implemented when not implemented has a 0 count" do
18
+ @formatter.dump_summary(3, 2, 1, 0)
19
19
  @io.string.should eql("\nFinished in 3 seconds\n\n2 examples, 1 failure\n")
20
20
  end
21
+
22
+ it "should produce standard summary" do
23
+ @formatter.dump_summary(3, 2, 1, 4)
24
+ @io.string.should eql("\nFinished in 3 seconds\n\n2 examples, 1 failure, 4 not implemented\n")
25
+ end
21
26
 
22
27
  it "should push F for failing spec" do
23
28
  @formatter.example_failed("spec", 98, Reporter::Failure.new("c s", RuntimeError.new))
@@ -10,7 +10,7 @@ describe "RdocFormatterDryRun" do
10
10
  @formatter.dry_run = true
11
11
  end
12
12
  it "should not produce summary on dry run" do
13
- @formatter.dump_summary(3, 2, 1)
13
+ @formatter.dump_summary(3, 2, 1, 0)
14
14
  @io.string.should == ""
15
15
  end
16
16
  end
@@ -10,7 +10,7 @@ describe "RdocFormatter" do
10
10
  @formatter.dry_run = true
11
11
  end
12
12
  it "should produce no summary" do
13
- @formatter.dump_summary(nil, nil, nil)
13
+ @formatter.dump_summary(nil, nil, nil, nil)
14
14
  @io.string.should be_empty
15
15
 
16
16
  end
@@ -34,6 +34,11 @@ describe "RdocFormatter" do
34
34
  @io.string.should eql("# * spec\n")
35
35
 
36
36
  end
37
+
38
+ it "should push out not implemented spec" do
39
+ @formatter.example_not_implemented("spec")
40
+ @io.string.should eql("# * spec [NOT IMPLEMENTED]\n")
41
+ end
37
42
 
38
43
  end
39
44
  end
@@ -10,7 +10,7 @@ describe "SpecdocFormatterDryRun" do
10
10
  @formatter.dry_run = true
11
11
  end
12
12
  it "should not produce summary on dry run" do
13
- @formatter.dump_summary(3, 2, 1)
13
+ @formatter.dump_summary(3, 2, 1, 0)
14
14
  @io.string.should eql("")
15
15
 
16
16
  end
@@ -7,13 +7,18 @@ describe "SpecdocFormatter" do
7
7
  before(:each) do
8
8
  @io = StringIO.new
9
9
  @formatter = SpecdocFormatter.new(@io)
10
-
11
10
  end
12
- it "should produce standard summary" do
13
- @formatter.dump_summary(3, 2, 1)
11
+
12
+ it "should produce standard summary without not implemented when not implemented has a 0 count" do
13
+ @formatter.dump_summary(3, 2, 1, 0)
14
14
  @io.string.should eql("\nFinished in 3 seconds\n\n2 examples, 1 failure\n")
15
-
16
15
  end
16
+
17
+ it "should produce standard summary" do
18
+ @formatter.dump_summary(3, 2, 1, 4)
19
+ @io.string.should eql("\nFinished in 3 seconds\n\n2 examples, 1 failure, 4 not implemented\n")
20
+ end
21
+
17
22
  it "should push context name" do
18
23
  @formatter.add_behaviour("context")
19
24
  @io.string.should eql("\ncontext\n")
@@ -39,8 +44,13 @@ describe "SpecdocFormatter" do
39
44
  @io.string.should eql("- spec\n")
40
45
 
41
46
  end
47
+
48
+ it "should push not implemented spec name" do
49
+ @formatter.example_not_implemented('spec')
50
+ @io.string.should eql("- spec (NOT IMPLEMENTED)\n")
51
+ end
42
52
 
43
53
  end
44
54
  end
45
55
  end
46
- end
56
+ end
@@ -302,6 +302,11 @@ describe "OptionParser" do
302
302
  options = parse(["some/spec.rb", "--diff", "--drb", "--colour"])
303
303
  end
304
304
 
305
+ it "should not return an Options object when --drb is specified" do
306
+ Spec::Runner::DrbCommandLine.stub!(:run)
307
+ parse(["some/spec.rb", "--drb"]).should be_nil
308
+ end
309
+
305
310
  it "should reverse spec order when --reverse is specified" do
306
311
  options = parse(["some/spec.rb", "--reverse"])
307
312
  end
@@ -30,7 +30,7 @@ module Spec
30
30
  @formatter.should_receive(:example_started).exactly(3).times
31
31
  @formatter.should_receive(:example_passed).exactly(3).times
32
32
  @formatter.should_receive(:start_dump)
33
- @formatter.should_receive(:dump_summary).with(:anything, 3, 0)
33
+ @formatter.should_receive(:dump_summary).with(:anything, 3, 0, 0)
34
34
  @reporter.add_behaviour("behaviour")
35
35
  @reporter.example_started("spec 1")
36
36
  @reporter.example_finished("spec 1")
@@ -51,7 +51,7 @@ module Spec
51
51
  @formatter.should_receive(:example_failed).with("example", 2, failure)
52
52
  @formatter.should_receive(:dump_failure).exactly(2).times
53
53
  @formatter.should_receive(:start_dump)
54
- @formatter.should_receive(:dump_summary).with(:anything, 4, 2)
54
+ @formatter.should_receive(:dump_summary).with(:anything, 4, 2, 0)
55
55
  @backtrace_tweaker.should_receive(:tweak_backtrace).twice
56
56
  @reporter.add_behaviour("behaviour")
57
57
  @reporter.example_finished("example")
@@ -64,7 +64,7 @@ module Spec
64
64
 
65
65
  it "should push stats to formatter even with no data" do
66
66
  @formatter.should_receive(:start_dump)
67
- @formatter.should_receive(:dump_summary).with(:anything, 0, 0)
67
+ @formatter.should_receive(:dump_summary).with(:anything, 0, 0, 0)
68
68
  @reporter.dump
69
69
  end
70
70
 
@@ -98,7 +98,7 @@ module Spec
98
98
  it "should account for passing example in stats" do
99
99
  @formatter.should_receive(:example_passed)
100
100
  @formatter.should_receive(:start_dump)
101
- @formatter.should_receive(:dump_summary).with(:anything, 1, 0)
101
+ @formatter.should_receive(:dump_summary).with(:anything, 1, 0, 0)
102
102
  @reporter.example_finished("example")
103
103
  @reporter.dump
104
104
  end
@@ -124,12 +124,30 @@ module Spec
124
124
  @formatter.should_receive(:example_failed).with("example", 1, failure)
125
125
  @formatter.should_receive(:start_dump)
126
126
  @formatter.should_receive(:dump_failure).with(1, :anything)
127
- @formatter.should_receive(:dump_summary).with(:anything, 1, 1)
127
+ @formatter.should_receive(:dump_summary).with(:anything, 1, 1, 0)
128
128
  @reporter.add_behaviour("behaviour")
129
129
  @reporter.example_finished("example", RuntimeError.new)
130
130
  @reporter.dump
131
131
  end
132
132
 
133
133
  end
134
+
135
+ describe Reporter, " reporting one not implemented example" do
136
+ include ReporterSpecHelper
137
+ before(:each) {setup}
138
+
139
+ it "should tell formatter example passed" do
140
+ @formatter.should_receive(:example_not_implemented)
141
+ @reporter.example_finished("example", nil, nil, true)
142
+ end
143
+
144
+ it "should account for not implemented example in stats" do
145
+ @formatter.should_receive(:example_not_implemented)
146
+ @formatter.should_receive(:start_dump)
147
+ @formatter.should_receive(:dump_summary).with(:anything, 1, 0, 1)
148
+ @reporter.example_finished("example", nil, nil, true)
149
+ @reporter.dump
150
+ end
151
+ end
134
152
  end
135
153
  end
@@ -24,7 +24,7 @@ module Spec
24
24
  MatchDescription.new(description)
25
25
  end
26
26
  end
27
-
27
+
28
28
  describe ExampleMatcher do
29
29
  include ExampleMatcherSpecHelper
30
30
 
@@ -30,7 +30,7 @@ describe SpecParserSubject do
30
30
 
31
31
  end
32
32
 
33
- describe SpecParserSubject, " described" do
33
+ describe SpecParserSubject, "described" do
34
34
 
35
35
  it "6" do
36
36
  end
@@ -1,7 +1,14 @@
1
1
  require 'stringio'
2
- $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
2
+ require 'rbconfig'
3
+
4
+ dir = File.dirname(__FILE__)
5
+ lib_path = File.expand_path("#{dir}/../lib")
6
+ $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
7
+
3
8
  require 'spec'
4
- require File.dirname(__FILE__) + '/../spec/spec/spec_classes'
9
+ require 'hpricot'
10
+ spec_classes_path = File.expand_path("#{dir}/../spec/spec/spec_classes")
11
+ require spec_classes_path unless $LOAD_PATH.include?(spec_classes_path)
5
12
 
6
13
  module Spec
7
14
  module Matchers
@@ -33,3 +40,32 @@ module Spec
33
40
  end
34
41
  end
35
42
  end
43
+
44
+ # There are some examples that need to load the same files repeatedly.
45
+ # Requiring spec files instead of loading them (see http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797),
46
+ # caused these specs to fail.
47
+ #
48
+ # This shared behaviour solves that problem by redefining the behaviour of
49
+ # load_specs only for those examples.
50
+ unless defined?(RSPEC_EXAMPLES_THAT_LOAD_FILES)
51
+ RSPEC_EXAMPLES_THAT_LOAD_FILES = describe "Examples that have to load files", :shared => true do
52
+ before(:all) do
53
+ Spec::Runner::BehaviourRunner.class_eval do
54
+ alias_method :orig_load_specs, :load_specs
55
+ def load_specs(paths)
56
+ paths.each do |path|
57
+ load path
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
+ after(:all) do
64
+ Spec::Runner::BehaviourRunner.class_eval do
65
+ undef :load_specs
66
+ alias_method :load_specs, :orig_load_specs
67
+ undef :orig_load_specs
68
+ end
69
+ end
70
+ end
71
+ end
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: rspec
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.4
7
- date: 2007-05-10 00:00:00 +02:00
8
- summary: RSpec-0.9.4 (r1935) - BDD for Ruby http://rspec.rubyforge.org/
6
+ version: 1.0.0
7
+ date: 2007-05-18 00:00:00 -07:00
8
+ summary: RSpec-1.0.0 (r1986) - BDD for Ruby http://rspec.rubyforge.org/
9
9
  require_paths:
10
10
  - lib
11
11
  email: rspec-devel@rubyforge.org
12
12
  homepage: http://rspec.rubyforge.org
13
13
  rubyforge_project: rspec
14
- description: "RSpec is a behaviour driven development (BDD) framework for Ruby. RSpec was created in response to Dave Astels' article _A New Look at Test Driven Development_ which can be read at: http://daveastels.com/index.php?p=5 RSpec is intended to provide the features discussed in Dave's article."
14
+ description: "RSpec is a behaviour driven development (BDD) framework for Ruby. RSpec was created in response to Dave Astels' article _A New Look at Test Driven Development_ which can be read at: http://daveastels.com/index.php?p=5 RSpec is intended to provide the features discussed in Dave's article."
15
15
  autorequire: spec
16
16
  default_executable: spec
17
17
  bindir: bin
@@ -35,16 +35,6 @@ files:
35
35
  - Rakefile
36
36
  - README
37
37
  - UPGRADE
38
- - lib/spec.rb
39
- - lib/spec/dsl.rb
40
- - lib/spec/expectations.rb
41
- - lib/spec/extensions.rb
42
- - lib/spec/matchers.rb
43
- - lib/spec/mocks.rb
44
- - lib/spec/runner.rb
45
- - lib/spec/test_case_adapter.rb
46
- - lib/spec/translator.rb
47
- - lib/spec/version.rb
48
38
  - lib/spec/dsl/behaviour.rb
49
39
  - lib/spec/dsl/behaviour_callbacks.rb
50
40
  - lib/spec/dsl/behaviour_eval.rb
@@ -55,13 +45,16 @@ files:
55
45
  - lib/spec/dsl/example.rb
56
46
  - lib/spec/dsl/example_matcher.rb
57
47
  - lib/spec/dsl/example_should_raise_handler.rb
58
- - lib/spec/expectations/errors.rb
59
- - lib/spec/expectations/extensions.rb
60
- - lib/spec/expectations/handler.rb
48
+ - lib/spec/dsl.rb
61
49
  - lib/spec/expectations/differs/default.rb
50
+ - lib/spec/expectations/errors.rb
62
51
  - lib/spec/expectations/extensions/object.rb
63
52
  - lib/spec/expectations/extensions/string_and_symbol.rb
53
+ - lib/spec/expectations/extensions.rb
54
+ - lib/spec/expectations/handler.rb
55
+ - lib/spec/expectations.rb
64
56
  - lib/spec/extensions/object.rb
57
+ - lib/spec/extensions.rb
65
58
  - lib/spec/matchers/be.rb
66
59
  - lib/spec/matchers/be_close.rb
67
60
  - lib/spec/matchers/change.rb
@@ -76,10 +69,12 @@ files:
76
69
  - lib/spec/matchers/respond_to.rb
77
70
  - lib/spec/matchers/satisfy.rb
78
71
  - lib/spec/matchers/throw_symbol.rb
72
+ - lib/spec/matchers.rb
79
73
  - lib/spec/mocks/argument_constraint_matchers.rb
80
74
  - lib/spec/mocks/argument_expectation.rb
81
75
  - lib/spec/mocks/error_generator.rb
82
76
  - lib/spec/mocks/errors.rb
77
+ - lib/spec/mocks/extensions/object.rb
83
78
  - lib/spec/mocks/message_expectation.rb
84
79
  - lib/spec/mocks/methods.rb
85
80
  - lib/spec/mocks/mock.rb
@@ -87,20 +82,13 @@ files:
87
82
  - lib/spec/mocks/proxy.rb
88
83
  - lib/spec/mocks/space.rb
89
84
  - lib/spec/mocks/spec_methods.rb
90
- - lib/spec/mocks/extensions/object.rb
85
+ - lib/spec/mocks.rb
91
86
  - lib/spec/rake/spectask.rb
92
87
  - lib/spec/rake/verify_rcov.rb
93
88
  - lib/spec/runner/backtrace_tweaker.rb
94
89
  - lib/spec/runner/behaviour_runner.rb
95
90
  - lib/spec/runner/command_line.rb
96
91
  - lib/spec/runner/drb_command_line.rb
97
- - lib/spec/runner/formatter.rb
98
- - lib/spec/runner/heckle_runner.rb
99
- - lib/spec/runner/heckle_runner_win.rb
100
- - lib/spec/runner/option_parser.rb
101
- - lib/spec/runner/options.rb
102
- - lib/spec/runner/reporter.rb
103
- - lib/spec/runner/spec_parser.rb
104
92
  - lib/spec/runner/extensions/kernel.rb
105
93
  - lib/spec/runner/extensions/object.rb
106
94
  - lib/spec/runner/formatter/base_formatter.rb
@@ -112,9 +100,18 @@ files:
112
100
  - lib/spec/runner/formatter/rdoc_formatter.rb
113
101
  - lib/spec/runner/formatter/snippet_extractor.rb
114
102
  - lib/spec/runner/formatter/specdoc_formatter.rb
115
- - spec/spec_helper.rb
116
- - spec/spec/spec_classes.rb
117
- - spec/spec/translator_spec.rb
103
+ - lib/spec/runner/formatter.rb
104
+ - lib/spec/runner/heckle_runner.rb
105
+ - lib/spec/runner/heckle_runner_win.rb
106
+ - lib/spec/runner/option_parser.rb
107
+ - lib/spec/runner/options.rb
108
+ - lib/spec/runner/reporter.rb
109
+ - lib/spec/runner/spec_parser.rb
110
+ - lib/spec/runner.rb
111
+ - lib/spec/test_case_adapter.rb
112
+ - lib/spec/translator.rb
113
+ - lib/spec/version.rb
114
+ - lib/spec.rb
118
115
  - spec/spec/dsl/behaviour_eval_spec.rb
119
116
  - spec/spec/dsl/behaviour_factory_spec.rb
120
117
  - spec/spec/dsl/behaviour_spec.rb
@@ -126,9 +123,9 @@ files:
126
123
  - spec/spec/dsl/example_should_raise_spec.rb
127
124
  - spec/spec/dsl/predicate_matcher_spec.rb
128
125
  - spec/spec/dsl/shared_behaviour_spec.rb
129
- - spec/spec/expectations/fail_with_spec.rb
130
126
  - spec/spec/expectations/differs/default_spec.rb
131
127
  - spec/spec/expectations/extensions/object_spec.rb
128
+ - spec/spec/expectations/fail_with_spec.rb
132
129
  - spec/spec/matchers/be_close_spec.rb
133
130
  - spec/spec/matchers/be_spec.rb
134
131
  - spec/spec/matchers/change_spec.rb
@@ -142,12 +139,10 @@ files:
142
139
  - spec/spec/matchers/include_spec.rb
143
140
  - spec/spec/matchers/match_spec.rb
144
141
  - spec/spec/matchers/matcher_methods_spec.rb
142
+ - spec/spec/matchers/operator_matcher_spec.rb
145
143
  - spec/spec/matchers/raise_error_spec.rb
146
144
  - spec/spec/matchers/respond_to_spec.rb
147
145
  - spec/spec/matchers/satisfy_spec.rb
148
- - spec/spec/matchers/should_===_spec.rb
149
- - spec/spec/matchers/should_==_spec.rb
150
- - spec/spec/matchers/should_=~_spec.rb
151
146
  - spec/spec/matchers/throw_symbol_spec.rb
152
147
  - spec/spec/mocks/any_number_of_times_spec.rb
153
148
  - spec/spec/mocks/argument_expectation_spec.rb
@@ -179,16 +174,6 @@ files:
179
174
  - spec/spec/runner/context_matching_spec.rb
180
175
  - spec/spec/runner/drb_command_line_spec.rb
181
176
  - spec/spec/runner/execution_context_spec.rb
182
- - spec/spec/runner/heckle_runner_spec.rb
183
- - spec/spec/runner/heckler_spec.rb
184
- - spec/spec/runner/noisy_backtrace_tweaker_spec.rb
185
- - spec/spec/runner/object_ext_spec.rb
186
- - spec/spec/runner/option_parser_spec.rb
187
- - spec/spec/runner/options_spec.rb
188
- - spec/spec/runner/quiet_backtrace_tweaker_spec.rb
189
- - spec/spec/runner/reporter_spec.rb
190
- - spec/spec/runner/spec_matcher_spec.rb
191
- - spec/spec/runner/spec_parser_spec.rb
192
177
  - spec/spec/runner/extensions/kernel_spec.rb
193
178
  - spec/spec/runner/formatter/failing_behaviours_formatter_spec.rb
194
179
  - spec/spec/runner/formatter/failing_examples_formatter_spec.rb
@@ -201,6 +186,19 @@ files:
201
186
  - spec/spec/runner/formatter/snippet_extractor_spec.rb
202
187
  - spec/spec/runner/formatter/specdoc_formatter_dry_run_spec.rb
203
188
  - spec/spec/runner/formatter/specdoc_formatter_spec.rb
189
+ - spec/spec/runner/heckle_runner_spec.rb
190
+ - spec/spec/runner/heckler_spec.rb
191
+ - spec/spec/runner/noisy_backtrace_tweaker_spec.rb
192
+ - spec/spec/runner/object_ext_spec.rb
193
+ - spec/spec/runner/option_parser_spec.rb
194
+ - spec/spec/runner/options_spec.rb
195
+ - spec/spec/runner/quiet_backtrace_tweaker_spec.rb
196
+ - spec/spec/runner/reporter_spec.rb
197
+ - spec/spec/runner/spec_matcher_spec.rb
198
+ - spec/spec/runner/spec_parser_spec.rb
199
+ - spec/spec/spec_classes.rb
200
+ - spec/spec/translator_spec.rb
201
+ - spec/spec_helper.rb
204
202
  - examples/auto_spec_description_example.rb
205
203
  - examples/before_and_after_example.rb
206
204
  - examples/behave_as_example.rb
@@ -216,6 +214,7 @@ files:
216
214
  - examples/legacy_spec.rb
217
215
  - examples/mocking_example.rb
218
216
  - examples/multi_threaded_behaviour_runner.rb
217
+ - examples/not_yet_implemented_spec.rb
219
218
  - examples/partial_mock_example.rb
220
219
  - examples/predicate_example.rb
221
220
  - examples/priority.txt
@@ -1,38 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper.rb'
2
-
3
- require 'spec/expectations/differs/default'
4
-
5
- describe "should ===" do
6
-
7
- it "should delegate message to target" do
8
- subject = "apple"
9
- subject.should_receive(:===).with("apple").and_return(true)
10
- subject.should === "apple"
11
- end
12
-
13
- it "should fail when target.===(actual) returns false" do
14
- subject = "apple"
15
- subject.should_receive(:===).with("orange").and_return(false)
16
- Spec::Expectations.should_receive(:fail_with).with(%[expected "orange", got "apple" (using ===)], "orange", "apple")
17
- subject.should === "orange"
18
- end
19
-
20
- end
21
-
22
- describe "should_not ===" do
23
-
24
- it "should delegate message to target" do
25
- subject = "orange"
26
- subject.should_receive(:===).with("apple").and_return(false)
27
- subject.should_not === "apple"
28
- end
29
-
30
- it "should fail when target.===(actual) returns false" do
31
- subject = "apple"
32
- subject.should_receive(:===).with("apple").and_return(true)
33
- Spec::Expectations.should_receive(:fail_with).with(%[expected not === "apple", got "apple"], "apple", "apple")
34
- subject.should_not === "apple"
35
- end
36
-
37
- end
38
-