nullstyle-test-spec 0.4.1
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.
- data/Manifest.txt +18 -0
- data/README +376 -0
- data/Rakefile +165 -0
- data/lib/test/spec.rb +660 -0
- data/lib/test/spec/dox.rb +148 -0
- data/lib/test/spec/rdox.rb +25 -0
- data/lib/test/spec/should-output.rb +49 -0
- data/lib/test/spec/version.rb +8 -0
- data/test-spec.gemspec +55 -0
- data/test/spec_dox.rb +39 -0
- data/test/spec_flexmock.rb +214 -0
- data/test/spec_mocha.rb +118 -0
- data/test/spec_nestedcontexts.rb +26 -0
- data/test/spec_new_style.rb +80 -0
- data/test/spec_should-output.rb +26 -0
- data/test/spec_testspec.rb +700 -0
- data/test/spec_testspec_order.rb +26 -0
- data/test/test_testunit.rb +22 -0
- metadata +80 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test/spec'
|
2
|
+
|
3
|
+
$foo = 0
|
4
|
+
|
5
|
+
context "Context First" do
|
6
|
+
specify "runs before Second" do
|
7
|
+
$foo.should.equal 0
|
8
|
+
$foo += 1
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context "Context Second" do
|
13
|
+
specify "runs before Last" do
|
14
|
+
$foo.should.equal 1
|
15
|
+
$foo += 1
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "Context Last" do
|
20
|
+
specify "runs last" do
|
21
|
+
$foo.should.equal 2
|
22
|
+
$foo += 1
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'test/spec'
|
2
|
+
|
3
|
+
class TestTestUnit < Test::Unit::TestCase
|
4
|
+
def test_still_works_on_its_own
|
5
|
+
assert_equal 1, 1
|
6
|
+
assert_raise(RuntimeError) { raise "Error" }
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_supports_should_good_enough
|
10
|
+
(2 + 3).should.be 5
|
11
|
+
lambda { raise "Error" }.should.raise
|
12
|
+
assert true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context "TestUnit" do
|
17
|
+
specify "works inside test/spec" do
|
18
|
+
assert_equal 1, 1
|
19
|
+
assert_raise(RuntimeError) { raise "Error" }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nullstyle-test-spec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Christian Neukirchen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-04-30 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: test/spec layers an RSpec-inspired interface on top of Test::Unit, so you can mix TDD and BDD (Behavior-Driven Development). test/spec is a clean-room implementation that maps most kinds of Test::Unit assertions to a `should'-like syntax.
|
17
|
+
email: chneukirchen@gmail.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- Manifest.txt
|
24
|
+
- README
|
25
|
+
files:
|
26
|
+
- Manifest.txt
|
27
|
+
- README
|
28
|
+
- Rakefile
|
29
|
+
- test-spec.gemspec
|
30
|
+
- lib/test/spec.rb
|
31
|
+
- lib/test/spec/dox.rb
|
32
|
+
- lib/test/spec/rdox.rb
|
33
|
+
- lib/test/spec/should-output.rb
|
34
|
+
- lib/test/spec/version.rb
|
35
|
+
- test/spec_dox.rb
|
36
|
+
- test/spec_flexmock.rb
|
37
|
+
- test/spec_mocha.rb
|
38
|
+
- test/spec_nestedcontexts.rb
|
39
|
+
- test/spec_new_style.rb
|
40
|
+
- test/spec_should-output.rb
|
41
|
+
- test/spec_testspec.rb
|
42
|
+
- test/spec_testspec_order.rb
|
43
|
+
- test/test_testunit.rb
|
44
|
+
has_rdoc: true
|
45
|
+
homepage: http://test-spec.rubyforge.org
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options:
|
48
|
+
- --main
|
49
|
+
- README
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
version:
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: "0"
|
63
|
+
version:
|
64
|
+
requirements: []
|
65
|
+
|
66
|
+
rubyforge_project:
|
67
|
+
rubygems_version: 1.0.1
|
68
|
+
signing_key:
|
69
|
+
specification_version: 2
|
70
|
+
summary: a Behaviour Driven Development interface for Test::Unit
|
71
|
+
test_files:
|
72
|
+
- test/spec_dox.rb
|
73
|
+
- test/spec_flexmock.rb
|
74
|
+
- test/spec_mocha.rb
|
75
|
+
- test/spec_nestedcontexts.rb
|
76
|
+
- test/spec_new_style.rb
|
77
|
+
- test/spec_should-output.rb
|
78
|
+
- test/spec_testspec.rb
|
79
|
+
- test/spec_testspec_order.rb
|
80
|
+
- test/test_testunit.rb
|