rspec 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.rdoc +59 -32
- data/Manifest.txt +6 -0
- data/Rakefile +2 -2
- data/examples/passing/options_example.rb +31 -0
- data/examples/passing/options_formatter.rb +20 -0
- data/features/expectations/expect_change.feature +65 -0
- data/features/expectations/expect_error.feature +44 -0
- data/lib/spec/example/example_group_factory.rb +4 -2
- data/lib/spec/example/example_group_methods.rb +5 -1
- data/lib/spec/example/example_group_proxy.rb +8 -0
- data/lib/spec/example/example_matcher.rb +2 -3
- data/lib/spec/example/example_methods.rb +14 -1
- data/lib/spec/example/example_proxy.rb +3 -4
- data/lib/spec/example/subject.rb +7 -7
- data/lib/spec/interop/test.rb +2 -1
- data/lib/spec/matchers/be_close.rb +5 -5
- data/lib/spec/matchers/be_instance_of.rb +2 -2
- data/lib/spec/matchers/be_kind_of.rb +2 -2
- data/lib/spec/matchers/compatibility.rb +2 -2
- data/lib/spec/matchers/eql.rb +4 -4
- data/lib/spec/matchers/equal.rb +18 -8
- data/lib/spec/matchers/extensions/instance_exec.rb +1 -3
- data/lib/spec/matchers/include.rb +4 -4
- data/lib/spec/matchers/match.rb +2 -2
- data/lib/spec/matchers/operator_matcher.rb +3 -2
- data/lib/spec/mocks/methods.rb +9 -0
- data/lib/spec/mocks/mock.rb +34 -24
- data/lib/spec/mocks/proxy.rb +1 -0
- data/lib/spec/mocks/spec_methods.rb +5 -5
- data/lib/spec/runner.rb +1 -2
- data/lib/spec/runner/configuration.rb +0 -0
- data/lib/spec/runner/drb_command_line.rb +2 -0
- data/lib/spec/runner/formatter/base_text_formatter.rb +1 -1
- data/lib/spec/runner/formatter/no_op_method_missing.rb +1 -1
- data/lib/spec/version.rb +1 -1
- data/spec/spec/example/example_group_proxy_spec.rb +24 -0
- data/spec/spec/example/example_methods_spec.rb +12 -0
- data/spec/spec/example/predicate_matcher_spec.rb +0 -0
- data/spec/spec/example/subject_spec.rb +16 -6
- data/spec/spec/matchers/change_spec.rb +85 -85
- data/spec/spec/matchers/compatibility_spec.rb +16 -22
- data/spec/spec/matchers/equal_spec.rb +33 -9
- data/spec/spec/matchers/have_spec.rb +1 -8
- data/spec/spec/mocks/mock_ordering_spec.rb +10 -0
- data/spec/spec/mocks/mock_spec.rb +106 -93
- data/spec/spec/mocks/stub_chain_spec.rb +27 -0
- data/spec/spec/mocks/stub_spec.rb +9 -5
- data/spec/spec/runner/configuration_spec.rb +0 -0
- data/spec/spec/runner/drb_command_line_spec.rb +1 -1
- data/spec/spec/runner/formatter/html_formatted-1.8.7.html +31 -46
- data/spec/spec/runner/formatter/html_formatted-1.9.1.html +25 -28
- data/spec/spec/runner/formatter/html_formatter_spec.rb +3 -19
- data/spec/spec/runner/formatter/profile_formatter_spec.rb +3 -18
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +4 -28
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +31 -46
- data/spec/spec/runner/formatter/text_mate_formatted-1.9.1.html +7 -10
- data/spec/spec/runner/reporter_spec.rb +1 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/support/macros.rb +29 -0
- metadata +36 -8
- metadata.gz.sig +1 -0
@@ -289,22 +289,19 @@ Diff:
|
|
289
289
|
<dd class="spec failed">
|
290
290
|
<span class="failed_spec_name">should print diff of different objects' pretty representation</span>
|
291
291
|
<div class="failure" id="failure_6">
|
292
|
-
<div class="message"><pre>
|
292
|
+
<div class="message"><pre>
|
293
|
+
expected <Animal
|
293
294
|
name=bob,
|
294
295
|
species=tortoise
|
295
296
|
>
|
296
|
-
|
297
|
+
|
298
|
+
got <Animal
|
297
299
|
name=bob,
|
298
300
|
species=giraffe
|
299
301
|
>
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
<Animal
|
304
|
-
name=bob,
|
305
|
-
-species=tortoise
|
306
|
-
+species=giraffe
|
307
|
-
>
|
302
|
+
|
303
|
+
|
304
|
+
(compared using eql?)
|
308
305
|
</pre></div>
|
309
306
|
<div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=34">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb:34</a> :in `block (2 levels) in <top (required)>'
|
310
307
|
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
|
@@ -193,7 +193,7 @@ module Spec
|
|
193
193
|
@deprecated_formatter = Class.new(@formatter.class) do
|
194
194
|
attr_reader :example_passed_to_method, :message_passed_to_method
|
195
195
|
|
196
|
-
def example_pending(example_passed_to_method, message_passed_to_method,
|
196
|
+
def example_pending(example_passed_to_method, message_passed_to_method, deprecated_pending_location)
|
197
197
|
@example_passed_to_method = example_passed_to_method
|
198
198
|
@message_passed_to_method = message_passed_to_method
|
199
199
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -10,6 +10,7 @@ require 'spec/mocks'
|
|
10
10
|
spec_classes_path = File.expand_path("#{dir}/../spec/spec/spec_classes")
|
11
11
|
require spec_classes_path unless $LOAD_PATH.include?(spec_classes_path)
|
12
12
|
require File.dirname(__FILE__) + '/../lib/spec/runner/differs/default'
|
13
|
+
require File.dirname(__FILE__) + '/support/macros'
|
13
14
|
|
14
15
|
def jruby?
|
15
16
|
::RUBY_PLATFORM == 'java'
|
@@ -108,3 +109,6 @@ module Spec
|
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
112
|
+
Spec::Runner.configure do |config|
|
113
|
+
config.extend(Macros)
|
114
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Macros
|
2
|
+
def treats_method_missing_as_private(options = {:noop => true, :subject => nil})
|
3
|
+
it "should have method_missing as private" do
|
4
|
+
with_ruby 1.8 do
|
5
|
+
described_class.private_instance_methods.should include("method_missing")
|
6
|
+
end
|
7
|
+
with_ruby 1.9 do
|
8
|
+
described_class.private_instance_methods.should include(:method_missing)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should not respond_to? method_missing (because it's private)" do
|
13
|
+
formatter = options[:subject] || described_class.new({ }, StringIO.new)
|
14
|
+
formatter.should_not respond_to(:method_missing)
|
15
|
+
end
|
16
|
+
|
17
|
+
if options[:noop]
|
18
|
+
it "should respond_to? all messages" do
|
19
|
+
formatter = described_class.new({ }, StringIO.new)
|
20
|
+
formatter.should respond_to(:just_about_anything)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should respond_to? anything, when given the private flag" do
|
24
|
+
formatter = described_class.new({ }, StringIO.new)
|
25
|
+
formatter.respond_to?(:method_missing, true).should be_true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RSpec Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDQDCCAiigAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMRQwEgYDVQQDDAtyc3Bl
|
14
|
+
Yy1kZXZlbDEZMBcGCgmSJomT8ixkARkWCXJ1Ynlmb3JnZTETMBEGCgmSJomT8ixk
|
15
|
+
ARkWA29yZzAeFw0wOTA0MjgyMDQ5NDVaFw0xMDA0MjgyMDQ5NDVaMEYxFDASBgNV
|
16
|
+
BAMMC3JzcGVjLWRldmVsMRkwFwYKCZImiZPy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date: 2009-04-
|
33
|
+
date: 2009-04-29 00:00:00 -05:00
|
13
34
|
default_executable:
|
14
35
|
dependencies:
|
15
36
|
- !ruby/object:Gem::Dependency
|
@@ -37,7 +58,6 @@ email:
|
|
37
58
|
- rspec-devel@rubyforge.org
|
38
59
|
executables:
|
39
60
|
- autospec
|
40
|
-
- spec
|
41
61
|
extensions: []
|
42
62
|
|
43
63
|
extra_rdoc_files:
|
@@ -91,6 +111,8 @@ files:
|
|
91
111
|
- examples/passing/mocking_example.rb
|
92
112
|
- examples/passing/multi_threaded_example_group_runner.rb
|
93
113
|
- examples/passing/nested_classes_example.rb
|
114
|
+
- examples/passing/options_example.rb
|
115
|
+
- examples/passing/options_formatter.rb
|
94
116
|
- examples/passing/partial_mock_example.rb
|
95
117
|
- examples/passing/pending_example.rb
|
96
118
|
- examples/passing/predicate_example.rb
|
@@ -108,6 +130,8 @@ files:
|
|
108
130
|
- features/example_groups/example_group_with_should_methods.feature
|
109
131
|
- features/example_groups/implicit_docstrings.feature
|
110
132
|
- features/example_groups/nested_groups.feature
|
133
|
+
- features/expectations/expect_change.feature
|
134
|
+
- features/expectations/expect_error.feature
|
111
135
|
- features/extensions/custom_example_group.feature
|
112
136
|
- features/formatters/custom_formatter.feature
|
113
137
|
- features/heckle/heckle.feature
|
@@ -350,6 +374,7 @@ files:
|
|
350
374
|
- spec/spec/mocks/passing_argument_matchers_spec.rb
|
351
375
|
- spec/spec/mocks/precise_counts_spec.rb
|
352
376
|
- spec/spec/mocks/record_messages_spec.rb
|
377
|
+
- spec/spec/mocks/stub_chain_spec.rb
|
353
378
|
- spec/spec/mocks/stub_spec.rb
|
354
379
|
- spec/spec/mocks/stubbed_message_expectations_spec.rb
|
355
380
|
- spec/spec/mocks/twice_counts_spec.rb
|
@@ -407,12 +432,15 @@ files:
|
|
407
432
|
- spec/spec/runner_spec.rb
|
408
433
|
- spec/spec/spec_classes.rb
|
409
434
|
- spec/spec_helper.rb
|
435
|
+
- spec/support/macros.rb
|
410
436
|
has_rdoc: true
|
411
437
|
homepage: http://rspec.info
|
438
|
+
licenses: []
|
439
|
+
|
412
440
|
post_install_message: |
|
413
441
|
**************************************************
|
414
442
|
|
415
|
-
Thank you for installing rspec-1.2.
|
443
|
+
Thank you for installing rspec-1.2.5
|
416
444
|
|
417
445
|
Please be sure to read History.rdoc and Upgrade.rdoc
|
418
446
|
for useful information about this release.
|
@@ -439,9 +467,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
439
467
|
requirements: []
|
440
468
|
|
441
469
|
rubyforge_project: rspec
|
442
|
-
rubygems_version: 1.3.
|
470
|
+
rubygems_version: 1.3.2
|
443
471
|
signing_key:
|
444
|
-
specification_version:
|
445
|
-
summary: rspec 1.2.
|
472
|
+
specification_version: 3
|
473
|
+
summary: rspec 1.2.5
|
446
474
|
test_files: []
|
447
475
|
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|