rspec 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. data/.document +4 -4
  2. data/{History.txt → History.rdoc} +27 -4
  3. data/Manifest.txt +18 -7
  4. data/{README.txt → README.rdoc} +0 -0
  5. data/Rakefile +16 -9
  6. data/{Ruby1.9.markdown → Ruby1.9.rdoc} +3 -3
  7. data/TODO.txt +0 -7
  8. data/Upgrade.rdoc +110 -0
  9. data/features/matchers/create_matcher.feature +40 -0
  10. data/features/matchers/create_matcher_outside_rspec.feature +39 -0
  11. data/features/pending/pending_examples.feature +5 -5
  12. data/features/step_definitions/running_rspec.rb +13 -0
  13. data/features/subject/explicit_subject.feature +31 -0
  14. data/features/subject/implicit_subject.feature +31 -0
  15. data/lib/spec/adapters/mock_frameworks/flexmock.rb +1 -0
  16. data/lib/spec/adapters/mock_frameworks/mocha.rb +1 -0
  17. data/lib/spec/adapters/mock_frameworks/rr.rb +1 -0
  18. data/lib/spec/adapters/mock_frameworks/rspec.rb +12 -10
  19. data/lib/spec/dsl.rb +0 -1
  20. data/lib/spec/dsl/main.rb +3 -3
  21. data/lib/spec/example.rb +4 -3
  22. data/lib/spec/example/example_group_factory.rb +1 -3
  23. data/lib/spec/example/example_group_methods.rb +22 -28
  24. data/lib/spec/example/example_group_proxy.rb +64 -0
  25. data/lib/spec/example/example_methods.rb +8 -11
  26. data/lib/spec/example/example_proxy.rb +42 -0
  27. data/lib/spec/example/shared_example_group.rb +1 -1
  28. data/lib/spec/example/subject.rb +14 -3
  29. data/lib/spec/expectations.rb +1 -1
  30. data/lib/spec/expectations/differs/default.rb +46 -49
  31. data/lib/spec/expectations/differs/load-diff-lcs.rb +12 -0
  32. data/lib/spec/interop/test/unit/testcase.rb +2 -2
  33. data/lib/spec/matchers.rb +49 -9
  34. data/lib/spec/matchers/be.rb +12 -15
  35. data/lib/spec/matchers/change.rb +1 -0
  36. data/lib/spec/matchers/dsl.rb +15 -0
  37. data/lib/spec/matchers/have.rb +9 -8
  38. data/lib/spec/matchers/include.rb +2 -16
  39. data/lib/spec/matchers/match_array.rb +2 -14
  40. data/lib/spec/matchers/matcher.rb +16 -11
  41. data/lib/spec/matchers/pretty.rb +36 -0
  42. data/lib/spec/matchers/raise_error.rb +9 -8
  43. data/lib/spec/matchers/simple_matcher.rb +1 -0
  44. data/lib/spec/matchers/throw_symbol.rb +1 -1
  45. data/lib/spec/mocks/argument_expectation.rb +2 -0
  46. data/lib/spec/mocks/message_expectation.rb +2 -0
  47. data/lib/spec/mocks/proxy.rb +9 -10
  48. data/lib/spec/runner.rb +1 -0
  49. data/lib/spec/runner/extensions/kernel.rb +9 -0
  50. data/lib/spec/runner/formatter/base_formatter.rb +22 -9
  51. data/lib/spec/runner/formatter/html_formatter.rb +2 -1
  52. data/lib/spec/runner/heckle_runner.rb +1 -0
  53. data/lib/spec/runner/option_parser.rb +4 -1
  54. data/lib/spec/runner/options.rb +11 -0
  55. data/lib/spec/runner/spec_parser.rb +15 -22
  56. data/lib/spec/version.rb +4 -6
  57. data/spec/autotest/autotest_helper.rb +6 -1
  58. data/spec/spec/dsl/main_spec.rb +3 -3
  59. data/spec/spec/example/example_group_factory_spec.rb +11 -23
  60. data/spec/spec/example/example_group_methods_spec.rb +45 -20
  61. data/spec/spec/example/example_group_proxy_spec.rb +63 -0
  62. data/spec/spec/example/example_group_spec.rb +15 -0
  63. data/spec/spec/example/example_methods_spec.rb +5 -35
  64. data/spec/spec/example/example_proxy_spec.rb +47 -0
  65. data/spec/spec/example/nested_example_group_spec.rb +3 -3
  66. data/spec/spec/example/shared_example_group_spec.rb +4 -4
  67. data/spec/spec/example/subject_spec.rb +77 -0
  68. data/spec/spec/matchers/be_close_spec.rb +10 -10
  69. data/spec/spec/matchers/be_instance_of_spec.rb +13 -8
  70. data/spec/spec/matchers/be_kind_of_spec.rb +10 -8
  71. data/spec/spec/{dsl/matchers_spec.rb → matchers/dsl_spec.rb} +4 -4
  72. data/spec/spec/matchers/matcher_spec.rb +53 -1
  73. data/spec/spec/matchers/matchers_spec.rb +2 -0
  74. data/spec/spec/package/bin_spec_spec.rb +4 -4
  75. data/spec/spec/runner/command_line_spec.rb +2 -2
  76. data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +4 -4
  77. data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +2 -2
  78. data/spec/spec/runner/formatter/html_formatted-1.8.4.html +1 -1
  79. data/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +1 -1
  80. data/spec/spec/runner/formatter/html_formatted-1.8.5.html +1 -1
  81. data/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +1 -1
  82. data/spec/spec/runner/formatter/html_formatted-1.8.6.html +1 -1
  83. data/spec/spec/runner/formatter/html_formatted-1.8.7.html +1 -1
  84. data/spec/spec/runner/formatter/html_formatted-1.9.1.html +1 -1
  85. data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +12 -11
  86. data/spec/spec/runner/formatter/profile_formatter_spec.rb +2 -2
  87. data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +2 -2
  88. data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +2 -2
  89. data/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +1 -1
  90. data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +1 -1
  91. data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +1 -1
  92. data/spec/spec/runner/formatter/text_mate_formatted-1.9.1.html +1 -1
  93. data/spec/spec/runner/option_parser_spec.rb +20 -0
  94. data/spec/spec/runner/options_spec.rb +23 -1
  95. data/spec/spec/runner/reporter_spec.rb +20 -17
  96. data/spec/spec/runner/spec_parser_spec.rb +1 -1
  97. metadata +33 -15
  98. data/Upgrade.markdown +0 -63
  99. data/lib/spec/dsl/matchers.rb +0 -13
  100. data/lib/spec/example/example_description.rb +0 -15
@@ -83,7 +83,7 @@ describe "SpecParser" do
83
83
  { "c:/somepath/somefile.rb:999:in 'method'" => "c:/somepath/somefile.rb",
84
84
  "./somepath/somefile:999" => "./somepath/somefile" }
85
85
  fixture.each_pair do |input, expected|
86
- parser.send(:parse_backtrace, input ).should == [[expected, 999]]
86
+ parser.send(:parse_location, input ).should == [expected, 999]
87
87
  end
88
88
  end
89
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RSpec Development Team
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-15 00:00:00 -05:00
12
+ date: 2009-03-22 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.10.0
33
+ version: 1.11.0
34
34
  version:
35
35
  description: Behaviour Driven Development for Ruby.
36
36
  email:
@@ -41,23 +41,21 @@ executables:
41
41
  extensions: []
42
42
 
43
43
  extra_rdoc_files:
44
- - History.txt
45
44
  - License.txt
46
45
  - Manifest.txt
47
- - README.txt
48
46
  - TODO.txt
49
47
  - examples/failing/README.txt
50
48
  files:
51
49
  - .autotest
52
50
  - .document
53
- - History.txt
51
+ - History.rdoc
54
52
  - License.txt
55
53
  - Manifest.txt
56
- - README.txt
54
+ - README.rdoc
57
55
  - Rakefile
58
- - Ruby1.9.markdown
56
+ - Ruby1.9.rdoc
59
57
  - TODO.txt
60
- - Upgrade.markdown
58
+ - Upgrade.rdoc
61
59
  - bin/autospec
62
60
  - bin/spec
63
61
  - cucumber.yml
@@ -116,12 +114,15 @@ files:
116
114
  - features/interop/test_but_not_test_unit.feature
117
115
  - features/interop/test_case_with_should_methods.feature
118
116
  - features/matchers/create_matcher.feature
117
+ - features/matchers/create_matcher_outside_rspec.feature
119
118
  - features/mock_framework_integration/use_flexmock.feature
120
119
  - features/mock_framework_integration/use_mocha.feature
121
120
  - features/mock_framework_integration/use_rr.feature
122
121
  - features/mocks/mix_stubs_and_mocks.feature
123
122
  - features/pending/pending_examples.feature
124
123
  - features/step_definitions/running_rspec.rb
124
+ - features/subject/explicit_subject.feature
125
+ - features/subject/implicit_subject.feature
125
126
  - features/support/env.rb
126
127
  - features/support/matchers/smart_match.rb
127
128
  - init.rb
@@ -135,17 +136,17 @@ files:
135
136
  - lib/spec/autorun.rb
136
137
  - lib/spec/dsl.rb
137
138
  - lib/spec/dsl/main.rb
138
- - lib/spec/dsl/matchers.rb
139
139
  - lib/spec/example.rb
140
140
  - lib/spec/example/before_and_after_hooks.rb
141
141
  - lib/spec/example/errors.rb
142
- - lib/spec/example/example_description.rb
143
142
  - lib/spec/example/example_group.rb
144
143
  - lib/spec/example/example_group_factory.rb
145
144
  - lib/spec/example/example_group_hierarchy.rb
146
145
  - lib/spec/example/example_group_methods.rb
146
+ - lib/spec/example/example_group_proxy.rb
147
147
  - lib/spec/example/example_matcher.rb
148
148
  - lib/spec/example/example_methods.rb
149
+ - lib/spec/example/example_proxy.rb
149
150
  - lib/spec/example/module_reopening_fix.rb
150
151
  - lib/spec/example/pending.rb
151
152
  - lib/spec/example/predicate_matchers.rb
@@ -153,6 +154,7 @@ files:
153
154
  - lib/spec/example/subject.rb
154
155
  - lib/spec/expectations.rb
155
156
  - lib/spec/expectations/differs/default.rb
157
+ - lib/spec/expectations/differs/load-diff-lcs.rb
156
158
  - lib/spec/expectations/errors.rb
157
159
  - lib/spec/expectations/extensions.rb
158
160
  - lib/spec/expectations/extensions/object.rb
@@ -170,6 +172,7 @@ files:
170
172
  - lib/spec/matchers/be_kind_of.rb
171
173
  - lib/spec/matchers/change.rb
172
174
  - lib/spec/matchers/compatibility.rb
175
+ - lib/spec/matchers/dsl.rb
173
176
  - lib/spec/matchers/eql.rb
174
177
  - lib/spec/matchers/equal.rb
175
178
  - lib/spec/matchers/errors.rb
@@ -184,6 +187,7 @@ files:
184
187
  - lib/spec/matchers/matcher.rb
185
188
  - lib/spec/matchers/method_missing.rb
186
189
  - lib/spec/matchers/operator_matcher.rb
190
+ - lib/spec/matchers/pretty.rb
187
191
  - lib/spec/matchers/raise_error.rb
188
192
  - lib/spec/matchers/respond_to.rb
189
193
  - lib/spec/matchers/satisfy.rb
@@ -215,6 +219,7 @@ files:
215
219
  - lib/spec/runner/configuration.rb
216
220
  - lib/spec/runner/drb_command_line.rb
217
221
  - lib/spec/runner/example_group_runner.rb
222
+ - lib/spec/runner/extensions/kernel.rb
218
223
  - lib/spec/runner/formatter/base_formatter.rb
219
224
  - lib/spec/runner/formatter/base_text_formatter.rb
220
225
  - lib/spec/runner/formatter/failing_example_groups_formatter.rb
@@ -254,19 +259,21 @@ files:
254
259
  - spec/ruby_forker.rb
255
260
  - spec/spec.opts
256
261
  - spec/spec/dsl/main_spec.rb
257
- - spec/spec/dsl/matchers_spec.rb
258
262
  - spec/spec/example/example_group_class_definition_spec.rb
259
263
  - spec/spec/example/example_group_factory_spec.rb
260
264
  - spec/spec/example/example_group_methods_spec.rb
265
+ - spec/spec/example/example_group_proxy_spec.rb
261
266
  - spec/spec/example/example_group_spec.rb
262
267
  - spec/spec/example/example_matcher_spec.rb
263
268
  - spec/spec/example/example_methods_spec.rb
269
+ - spec/spec/example/example_proxy_spec.rb
264
270
  - spec/spec/example/helper_method_spec.rb
265
271
  - spec/spec/example/nested_example_group_spec.rb
266
272
  - spec/spec/example/pending_module_spec.rb
267
273
  - spec/spec/example/predicate_matcher_spec.rb
268
274
  - spec/spec/example/shared_example_group_spec.rb
269
275
  - spec/spec/example/subclassing_example_group_spec.rb
276
+ - spec/spec/example/subject_spec.rb
270
277
  - spec/spec/expectations/differs/default_spec.rb
271
278
  - spec/spec/expectations/extensions/object_spec.rb
272
279
  - spec/spec/expectations/fail_with_spec.rb
@@ -291,6 +298,7 @@ files:
291
298
  - spec/spec/matchers/change_spec.rb
292
299
  - spec/spec/matchers/compatibility_spec.rb
293
300
  - spec/spec/matchers/description_generation_spec.rb
301
+ - spec/spec/matchers/dsl_spec.rb
294
302
  - spec/spec/matchers/eql_spec.rb
295
303
  - spec/spec/matchers/equal_spec.rb
296
304
  - spec/spec/matchers/exist_spec.rb
@@ -301,6 +309,7 @@ files:
301
309
  - spec/spec/matchers/match_spec.rb
302
310
  - spec/spec/matchers/matcher_methods_spec.rb
303
311
  - spec/spec/matchers/matcher_spec.rb
312
+ - spec/spec/matchers/matchers_spec.rb
304
313
  - spec/spec/matchers/operator_matcher_spec.rb
305
314
  - spec/spec/matchers/raise_error_spec.rb
306
315
  - spec/spec/matchers/respond_to_spec.rb
@@ -396,10 +405,19 @@ files:
396
405
  - spec/spec_helper.rb
397
406
  has_rdoc: true
398
407
  homepage: http://rspec.info/
399
- post_install_message:
408
+ post_install_message: |
409
+ **************************************************
410
+
411
+ Thank you for installing rspec-1.2.1
412
+
413
+ Please be sure to read History.rdoc and Upgrade.rdoc
414
+ for useful information about this release.
415
+
416
+ **************************************************
417
+
400
418
  rdoc_options:
401
419
  - --main
402
- - README.txt
420
+ - README.rdoc
403
421
  require_paths:
404
422
  - lib
405
423
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -420,6 +438,6 @@ rubyforge_project: rspec
420
438
  rubygems_version: 1.3.1
421
439
  signing_key:
422
440
  specification_version: 2
423
- summary: rspec 1.2.0
441
+ summary: rspec 1.2.1
424
442
  test_files: []
425
443
 
@@ -1,63 +0,0 @@
1
- # Upgrade to rspec-1.2.0
2
-
3
- ## What's Changed
4
-
5
- ### WARNINGS
6
-
7
- * If you use the ruby command to run specs instead of the spec command, you'll
8
- need to require 'spec/autorun' or they won't run. This won't affect you if
9
- you use the spec command or the Spec::Rake::SpecTask that ships with RSpec.
10
-
11
- * require 'spec/test/unit' to invoke test/unit interop if you're using
12
- RSpec's core (this is handled implicitly with spec-rails)
13
-
14
- * setup and teardown are gone - use before and after instead
15
-
16
- * you can still use setup and teardown if you're using
17
- Test::Unit::TestCase as the base ExampleGroup class (which is implicit
18
- in rspec-rails)
19
-
20
- * The matcher protocol has been improved. The old protocol is still supported,
21
- but we added support for two new methods that speak a bit more clearly:
22
-
23
- * ``failure_message => failure_message_for_should``
24
- * ``negative_failure_message => failure_message_for_should_not``
25
-
26
- * All references to rubygems have been removed from within rspec's code.
27
-
28
- * See http://gist.github.com/54177 for rationale and suggestions on
29
- alternative approaches to loading rubygems
30
-
31
- ## What's new
32
-
33
- ### Ruby 1.9
34
-
35
- RSpec now works with Ruby 1.9.1. See
36
- [http://wiki.github.com/dchelimsky/rspec/ruby-191](http://wiki.github.com/dchelimsky/rspec/ruby-191)
37
- for useful information.
38
-
39
- ### Improved heckle integration
40
-
41
- RSpec works with heckle again [1]! Gotta use heckle >= 1.4.2 for this to work
42
- though, and it only works with ruby-1.8.6 and 1.8.7 (heckle doesn't support
43
- 1.9.1 yet).
44
-
45
- [sudo] gem install heckle --version ">=1.4.2"
46
- spec spec/game/mastermind.rb --heckle Game::Mastermind
47
-
48
- ### New Matcher DSL
49
-
50
- We've added a new DSL for generating custom matchers very simply and cleanly.
51
- We'll still support the simple_matcher method, so never fear if you're using
52
- that, but we recommend that you start developing your new matchers with this
53
- new syntax.
54
-
55
- Spec::Matchers.create do :be_a_multiple_of |smaller|
56
- match do |bigger|
57
- bigger % smaller == 0
58
- end
59
- end
60
-
61
- 9.should be_a_multiple_of(3)
62
-
63
- See ``features/matchers/create_matcher_.feature`` for more examples
@@ -1,13 +0,0 @@
1
- module Spec
2
- module DSL
3
- module Matchers
4
- def create(name, &block_passed_to_create)
5
- define_method name do |expected|
6
- Spec::Matchers::Matcher.new name, expected, &block_passed_to_create
7
- end
8
- end
9
- end
10
- end
11
- end
12
-
13
- Spec::Matchers.extend Spec::DSL::Matchers
@@ -1,15 +0,0 @@
1
- module Spec
2
- module Example
3
- class ExampleDescription
4
- attr_reader :description, :options, :backtrace
5
-
6
- def initialize(description, options={}, backtrace=nil)
7
- @description, @options, @backtrace = description, options, backtrace
8
- end
9
-
10
- def ==(other)
11
- (other.description == description) & (other.backtrace == backtrace)
12
- end
13
- end
14
- end
15
- end