rspec-core 2.0.0.beta.3 → 2.0.0.beta.4

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.
@@ -31,9 +31,11 @@ end
31
31
  # --------------------------------------------------
32
32
  # Watchr Rules
33
33
  # --------------------------------------------------
34
- watch('^spec/(.*)_spec\.rb' ) { |m| run_test_matching(m[1]) }
35
- watch('^lib/(.*)\.rb' ) { |m| run_test_matching(m[1]) }
36
- watch('^spec/spec_helper\.rb') { run_all_tests }
34
+ watch('^spec/(.*)_spec\.rb') { |m| run_test_matching(m[1]) }
35
+ watch('^lib/(.*)\.rb') { |m| run_test_matching(m[1]) }
36
+ watch('^spec/spec_helper\.rb') { run_all_tests }
37
+ watch('^spec/support/.*\.rb') { run_all_tests }
38
+
37
39
  # --------------------------------------------------
38
40
  # Signal Handling
39
41
  # --------------------------------------------------
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - beta
10
- - 3
11
- version: 2.0.0.beta.3
10
+ - 4
11
+ version: 2.0.0.beta.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Chad Humphries
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-03-08 00:00:00 -06:00
20
+ date: 2010-03-15 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -32,8 +32,8 @@ dependencies:
32
32
  - 0
33
33
  - 0
34
34
  - beta
35
- - 3
36
- version: 2.0.0.beta.3
35
+ - 4
36
+ version: 2.0.0.beta.4
37
37
  type: :development
38
38
  version_requirements: *id001
39
39
  - !ruby/object:Gem::Dependency
@@ -48,8 +48,8 @@ dependencies:
48
48
  - 0
49
49
  - 0
50
50
  - beta
51
- - 3
52
- version: 2.0.0.beta.3
51
+ - 4
52
+ version: 2.0.0.beta.4
53
53
  type: :development
54
54
  version_requirements: *id002
55
55
  - !ruby/object:Gem::Dependency
@@ -66,6 +66,20 @@ dependencies:
66
66
  version: 0.5.3
67
67
  type: :development
68
68
  version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: autotest
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ segments:
77
+ - 4
78
+ - 2
79
+ - 9
80
+ version: 4.2.9
81
+ type: :development
82
+ version_requirements: *id004
69
83
  description: Rspec runner and example group classes
70
84
  email: dchelimsky@gmail.com;chad.humphries@gmail.com
71
85
  executables:
@@ -85,6 +99,7 @@ files:
85
99
  - TODO.markdown
86
100
  - Upgrade.markdown
87
101
  - VERSION
102
+ - autotest/discover.rb
88
103
  - bin/rspec
89
104
  - bin/spec
90
105
  - cucumber.yml
@@ -135,20 +150,13 @@ files:
135
150
  - example_specs/passing/yielding_example.rb
136
151
  - example_specs/ruby1.9.compatibility/access_to_constants_spec.rb
137
152
  - example_specs/spec_helper.rb
138
- - features-pending/formatters/custom_formatter.feature
139
- - features-pending/heckle/heckle.feature
140
- - features-pending/interop/examples_and_tests_together.feature
141
- - features-pending/interop/rspec_output.feature
142
- - features-pending/interop/test_but_not_test_unit.feature
143
- - features-pending/interop/test_case_with_should_methods.feature
144
- - features-pending/mocks/stub_implementation.feature
145
- - features-pending/pending/pending_examples.feature
146
153
  - features/command_line/example_name_option.feature
147
154
  - features/command_line/line_number_appended_to_path.feature
148
155
  - features/command_line/line_number_option.feature
149
156
  - features/configuration/spec_opts.feature
150
157
  - features/example_groups/describe_aliases.feature
151
158
  - features/example_groups/nested_groups.feature
159
+ - features/formatters/custom_formatter.feature
152
160
  - features/hooks/around_hook.feature
153
161
  - features/hooks/before_and_after_hooks.feature
154
162
  - features/hooks/described_class.feature
@@ -157,9 +165,11 @@ files:
157
165
  - features/mock_framework_integration/use_mocha.feature
158
166
  - features/mock_framework_integration/use_rr.feature
159
167
  - features/mock_framework_integration/use_rspec.feature
168
+ - features/pending/pending_examples.feature
160
169
  - features/subject/explicit_subject.feature
161
170
  - features/subject/implicit_subject.feature
162
171
  - features/support/env.rb
172
+ - lib/autotest/rspec2.rb
163
173
  - lib/rspec/autorun.rb
164
174
  - lib/rspec/core.rb
165
175
  - lib/rspec/core/around_proxy.rb
@@ -194,6 +204,8 @@ files:
194
204
  - lib/rspec/core/world.rb
195
205
  - rspec-core.gemspec
196
206
  - script/console
207
+ - spec/autotest/failed_results_re_spec.rb
208
+ - spec/autotest/rspec_spec.rb
197
209
  - spec/rspec/core/command_line_options_spec.rb
198
210
  - spec/rspec/core/configuration_spec.rb
199
211
  - spec/rspec/core/example_group_spec.rb
@@ -218,6 +230,7 @@ files:
218
230
  - spec/rspec/core_spec.rb
219
231
  - spec/ruby_forker.rb
220
232
  - spec/spec_helper.rb
233
+ - spec/support/matchers.rb
221
234
  - specs.watchr
222
235
  has_rdoc: true
223
236
  homepage: http://github.com/rspec/core
@@ -226,7 +239,7 @@ licenses: []
226
239
  post_install_message: |
227
240
  **************************************************
228
241
 
229
- Thank you for installing rspec-core-2.0.0.beta.3
242
+ Thank you for installing rspec-core-2.0.0.beta.4
230
243
 
231
244
  This is beta software. If you are looking
232
245
  for a supported production release, please
@@ -260,8 +273,10 @@ rubyforge_project: rspec
260
273
  rubygems_version: 1.3.6
261
274
  signing_key:
262
275
  specification_version: 3
263
- summary: rspec-core-2.0.0.beta.3
276
+ summary: rspec-core-2.0.0.beta.4
264
277
  test_files:
278
+ - spec/autotest/failed_results_re_spec.rb
279
+ - spec/autotest/rspec_spec.rb
265
280
  - spec/rspec/core/command_line_options_spec.rb
266
281
  - spec/rspec/core/configuration_spec.rb
267
282
  - spec/rspec/core/example_group_spec.rb
@@ -286,3 +301,4 @@ test_files:
286
301
  - spec/rspec/core_spec.rb
287
302
  - spec/ruby_forker.rb
288
303
  - spec/spec_helper.rb
304
+ - spec/support/matchers.rb
@@ -1,56 +0,0 @@
1
- Feature: heckle a class
2
-
3
- As an RSpec user who wants to verify that
4
- my specs cover what I think it covers
5
- I want to heckle a class
6
-
7
- Scenario: Heckle finds problems
8
- Given a file named "heckle_fail_spec.rb" with:
9
- """
10
- class Thing
11
- def a_or_b
12
- if true
13
- "a"
14
- else
15
- "b"
16
- end
17
- end
18
- end
19
-
20
- describe Thing do
21
- it "returns a for true" do
22
- Thing.new.a_or_b.should == "a"
23
- end
24
- end
25
- """
26
- When I run "spec heckle_fail_spec.rb --heckle Thing"
27
- Then the stdout should match "The following mutations didn't cause test failures:"
28
- But the stdout should not match "FAILED"
29
-
30
- Scenario: Heckle does not find a problem
31
- Given a file named "heckle_success_spec.rb" with:
32
- """
33
- class Thing
34
- def a_or_b(key)
35
- if key
36
- "a"
37
- else
38
- "b"
39
- end
40
- end
41
- end
42
-
43
- describe Thing do
44
- it "returns a for true" do
45
- Thing.new.a_or_b(true).should == "a"
46
- end
47
-
48
- it "returns b for false" do
49
- Thing.new.a_or_b(false).should == "b"
50
- end
51
- end
52
- """
53
- When I run "spec heckle_success_spec.rb --heckle Thing"
54
- Then the stdout should match "No mutants survived"
55
- But the stdout should not match "FAILED"
56
-
@@ -1,80 +0,0 @@
1
- Feature: Spec and test together
2
-
3
- As an RSpec adopter with existing Test::Unit tests
4
- I want to run a few specs alongside my existing Test::Unit tests
5
- So that I can experience a smooth, gradual migration path
6
-
7
- Scenario Outline: Run specs and tests together
8
- Given a file named "spec_and_test_together.rb" with:
9
- """
10
- require 'rspec/autorun'
11
- require 'spec/test/unit'
12
-
13
- describe "An Example" do
14
- it "should pass with assert" do
15
- assert true
16
- end
17
-
18
- it "should fail with assert" do
19
- assert false
20
- end
21
-
22
- it "should pass with should" do
23
- 1.should == 1
24
- end
25
-
26
- it "should fail with should" do
27
- 1.should == 2
28
- end
29
- end
30
-
31
- class ATest < Test::Unit::TestCase
32
- def test_should_pass_with_assert
33
- assert true
34
- end
35
-
36
- def test_should_fail_with_assert
37
- assert false
38
- end
39
-
40
- def test_should_pass_with_should
41
- 1.should == 1
42
- end
43
-
44
- def test_should_fail_with_should
45
- 1.should == 2
46
- end
47
-
48
- def setup
49
- @from_setup ||= 3
50
- @from_setup += 1
51
- end
52
-
53
- def test_should_fail_with_setup_method_variable
54
- @from_setup.should == 40
55
- end
56
-
57
- before do
58
- @from_before = @from_setup + 1
59
- end
60
-
61
- def test_should_fail_with_before_block_variable
62
- @from_before.should == 50
63
- end
64
- end
65
- """
66
-
67
- When I run "<Command> spec_and_test_together.rb -fs"
68
-
69
- Then the exit code should be 256
70
- And the stdout should match "ATest"
71
- And the stdout should match "Test::Unit::AssertionFailedError in 'An Example should fail with assert'"
72
- And the stdout should match "'An Example should fail with should' FAILED"
73
- And the stdout should match "10 examples, 6 failures"
74
- And the stdout should match /expected: 40,\s*got: 4/m
75
- And the stdout should match /expected: 50,\s*got: 5/m
76
-
77
- Scenarios: run with ruby and spec
78
- | Command |
79
- | ruby |
80
- | spec |
@@ -1,25 +0,0 @@
1
- Feature: spec output
2
-
3
- When running in interop mode with test/unit, RSpec will output
4
- the RSpec summary, but not the test/unit summary.
5
-
6
- Scenario Outline: Interop mode with test/unit
7
- Given a file named "simple_spec.rb" with:
8
- """
9
- require 'rspec/autorun'
10
-
11
- describe "Running an Example" do
12
- it "should not output twice" do
13
- true.should be_true
14
- end
15
- end
16
- """
17
- When I run "<Command> simple_spec.rb"
18
- Then the exit code should be 0
19
- And the stdout should not match /\d+ tests, \d+ assertions, \d+ failures, \d+ errors/m
20
- And the stdout should match "1 example, 0 failures"
21
-
22
- Scenarios: Run with ruby and rspec/commands
23
- | Command |
24
- | ruby |
25
- | cmdline.rb |
@@ -1,26 +0,0 @@
1
- Story: Test is defined, but not Test::Unit
2
-
3
- As an RSpec user who has my own library named Test (but not Test::Unit)
4
- I want to run examples without getting Test::Unit NameErrors
5
-
6
- Scenario Outline: Spec including Test const but not Test::Unit
7
- Given a file named "spec_including_test_but_not_unit.rb" with:
8
- """
9
- require 'rspec/autorun'
10
-
11
- module Test
12
- end
13
-
14
- describe "description" do
15
- it "should description" do
16
- 1.should == 1
17
- end
18
- end
19
- """
20
- When I run "<Command> spec_including_test_but_not_unit.rb"
21
- Then the stderr should not match "Test::Unit"
22
-
23
- Scenarios: Run with ruby and spec
24
- | Command |
25
- | ruby |
26
- | spec |
@@ -1,46 +0,0 @@
1
- Story: Test::Unit::TestCase extended by rspec with should methods
2
-
3
- As an RSpec adopter with existing Test::Unit tests
4
- I want to use should_* methods in a Test::Unit::TestCase
5
- So that I use RSpec with classes and methods that look more like RSpec examples
6
-
7
- Scenario Outline: TestCase with should methods
8
- Given a file named "test_case_with_should_methods.rb" with:
9
- """
10
- require 'rspec/autorun'
11
- require 'spec/test/unit'
12
-
13
- class MyTest < Test::Unit::TestCase
14
- def should_pass_with_should
15
- 1.should == 1
16
- end
17
-
18
- def should_fail_with_should
19
- 1.should == 2
20
- end
21
-
22
- def should_pass_with_assert
23
- assert true
24
- end
25
-
26
- def should_fail_with_assert
27
- assert false
28
- end
29
-
30
- def test
31
- raise "This is not a real test"
32
- end
33
-
34
- def test_ify
35
- raise "This is a real test"
36
- end
37
- end
38
- """
39
- When I run "<Command> test_case_with_should_methods.rb"
40
- Then the exit code should be 256
41
- And the stdout should match "5 examples, 3 failures"
42
-
43
- Scenarios: Run with ruby and spec
44
- | Command |
45
- | ruby |
46
- | spec |
@@ -1,26 +0,0 @@
1
- Feature: stub implementation
2
-
3
- As an rspec user, I want to stub a complete implementation, not just a
4
- return value.
5
-
6
- Scenario: stub implementation
7
- Given a file named "stub_implementation.rb" with:
8
- """
9
- describe "a stubbed implementation" do
10
- it "works" do
11
- object = Object.new
12
- object.stub(:foo) do |arg|
13
- if arg == :this
14
- "got this"
15
- elsif arg == :that
16
- "got that"
17
- end
18
- end
19
-
20
- object.foo(:this).should == "got this"
21
- object.foo(:that).should == "got that"
22
- end
23
- end
24
- """
25
- When I run "spec stub_implementation.rb"
26
- Then the stdout should match "1 example, 0 failures"
@@ -1,81 +0,0 @@
1
- Feature: pending examples
2
-
3
- RSpec offers three ways to indicate that an example is disabled pending
4
- some action.
5
-
6
- Scenario: pending implementation
7
- Given a file named "example_without_block_spec.rb" with:
8
- """
9
- describe "an example" do
10
- it "has not yet been implemented"
11
- end
12
- """
13
- When I run "spec example_without_block_spec.rb"
14
- Then the exit code should be 0
15
- And the stdout should match "1 example, 0 failures, 1 pending"
16
- And the stdout should match "Not Yet Implemented"
17
- And the stdout should match "example_without_block_spec.rb:2"
18
-
19
- Scenario: pending implementation with spec/test/unit
20
- Given a file named "example_without_block_spec.rb" with:
21
- """
22
- require 'spec/test/unit'
23
- describe "an example" do
24
- it "has not yet been implemented"
25
- end
26
- """
27
- When I run "spec example_without_block_spec.rb"
28
- Then the exit code should be 0
29
- And the stdout should match "1 example, 0 failures, 1 pending"
30
- And the stdout should match "Not Yet Implemented"
31
- And the stdout should match "example_without_block_spec.rb:3"
32
-
33
- Scenario: pending any arbitary reason, with no block
34
- Given a file named "pending_without_block_spec.rb" with:
35
- """
36
- describe "an example" do
37
- it "is implemented but waiting" do
38
- pending("something else getting finished")
39
- end
40
- end
41
- """
42
- When I run "spec pending_without_block_spec.rb"
43
- Then the exit code should be 0
44
- And the stdout should match "1 example, 0 failures, 1 pending"
45
- And the stdout should match "(something else getting finished)"
46
- And the stdout should match "pending_without_block_spec.rb:2"
47
-
48
- Scenario: pending any arbitary reason, with a block that fails
49
- Given a file named "pending_with_failing_block_spec.rb" with:
50
- """
51
- describe "an example" do
52
- it "is implemented but waiting" do
53
- pending("something else getting finished") do
54
- raise "this is the failure"
55
- end
56
- end
57
- end
58
- """
59
- When I run "spec pending_with_failing_block_spec.rb"
60
- Then the exit code should be 0
61
- And the stdout should match "1 example, 0 failures, 1 pending"
62
- And the stdout should match "(something else getting finished)"
63
- And the stdout should match "pending_with_failing_block_spec.rb:2"
64
-
65
- Scenario: pending any arbitary reason, with a block that passes
66
- Given a file named "pending_with_passing_block_spec.rb" with:
67
- """
68
- describe "an example" do
69
- it "is implemented but waiting" do
70
- pending("something else getting finished") do
71
- true.should be(true)
72
- end
73
- end
74
- end
75
- """
76
- When I run "spec pending_with_passing_block_spec.rb"
77
- Then the exit code should be 256
78
- And the stdout should match "1 example, 1 failure"
79
- And the stdout should match "FIXED"
80
- And the stdout should match "Expected pending 'something else getting finished' to fail. No Error was raised."
81
- And the stdout should match "pending_with_passing_block_spec.rb:3"