oktobertest 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +3 -3
- data/lib/oktobertest.rb +3 -3
- data/test/scope_test.rb +27 -0
- data/test/setup_test.rb +2 -2
- data/test/teardown_test.rb +5 -0
- data/test/test_test.rb +12 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cb35368edf512830d4110c4c069433b1fabb3b4
|
4
|
+
data.tar.gz: fd17bfa67fe3cd2ef280c83bb73a9b1c725147fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de83acb718335476690b83f2f1d08b8d5971d645044286416f62617bea065cad1967d0de7e518d2ff264133b9dbb3d0480e465d0744ede4679e7918f9fc97003
|
7
|
+
data.tar.gz: 8e5d77c81b2b9c5edb7341ed242cd1ada37de76d4d2788efab0cb397808ebd7926c54f4a16efcb080e72bb74656de1e3a237836d7f90f013d6cc6f2e065869b0
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -115,11 +115,11 @@ Using `ruby`:
|
|
115
115
|
$ ruby -r oktobertest test/*_test.rb
|
116
116
|
```
|
117
117
|
|
118
|
-
When using `ruby` directly, you can specify the scope (`
|
119
|
-
(`
|
118
|
+
When using `ruby` directly, you can specify the scope (`S`) or the test
|
119
|
+
(`T`) to run:
|
120
120
|
|
121
121
|
```bash
|
122
|
-
$
|
122
|
+
$ T='test this' ruby -r oktobertest test/*_test.rb
|
123
123
|
```
|
124
124
|
|
125
125
|
### Testing Rack applications
|
data/lib/oktobertest.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Oktobertest
|
2
|
-
VERSION = '0.
|
2
|
+
VERSION = '0.3.0'
|
3
3
|
|
4
4
|
TestFailed = Class.new StandardError
|
5
5
|
TestSkipped = Class.new StandardError
|
@@ -53,7 +53,7 @@ module Oktobertest
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def run?
|
56
|
-
!ENV['
|
56
|
+
!ENV['S'] || ENV['S'] == @name
|
57
57
|
end
|
58
58
|
|
59
59
|
protected
|
@@ -106,7 +106,7 @@ module Oktobertest
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def run?
|
109
|
-
!ENV['
|
109
|
+
!ENV['T'] || ENV['T'] == @name
|
110
110
|
end
|
111
111
|
end
|
112
112
|
end
|
data/test/scope_test.rb
CHANGED
@@ -10,11 +10,24 @@ scope do
|
|
10
10
|
assert foo == 'foo'
|
11
11
|
end
|
12
12
|
|
13
|
+
test 'does not respond to bar' do
|
14
|
+
assert !respond_to?(:bar)
|
15
|
+
end
|
16
|
+
|
13
17
|
scope do
|
18
|
+
def bar
|
19
|
+
'bar'
|
20
|
+
end
|
21
|
+
|
14
22
|
test 'responds to foo' do
|
15
23
|
assert respond_to? :foo
|
16
24
|
assert foo == 'foo'
|
17
25
|
end
|
26
|
+
|
27
|
+
test 'responds to bar' do
|
28
|
+
assert respond_to? :bar
|
29
|
+
assert bar == 'bar'
|
30
|
+
end
|
18
31
|
end
|
19
32
|
end
|
20
33
|
|
@@ -53,3 +66,17 @@ scope do
|
|
53
66
|
assert @bar.nil?
|
54
67
|
end
|
55
68
|
end
|
69
|
+
|
70
|
+
scope do
|
71
|
+
def foo
|
72
|
+
'foo'
|
73
|
+
end
|
74
|
+
|
75
|
+
setup do
|
76
|
+
@foo = foo
|
77
|
+
end
|
78
|
+
|
79
|
+
test 'foo is defined' do
|
80
|
+
assert @foo == 'foo'
|
81
|
+
end
|
82
|
+
end
|
data/test/setup_test.rb
CHANGED
@@ -40,7 +40,7 @@ scope do
|
|
40
40
|
@bar = 'bar'
|
41
41
|
end
|
42
42
|
|
43
|
-
test '
|
43
|
+
test 'foo and bar are defined, but baz is not' do
|
44
44
|
assert @foo == 'foo'
|
45
45
|
assert @bar == 'bar'
|
46
46
|
assert @baz.nil?
|
@@ -50,7 +50,7 @@ scope do
|
|
50
50
|
@baz = 'baz'
|
51
51
|
end
|
52
52
|
|
53
|
-
test '
|
53
|
+
test 'foo, bar and baz are defined' do
|
54
54
|
assert @foo == 'foo'
|
55
55
|
assert @bar == 'bar'
|
56
56
|
assert @baz == 'baz'
|
data/test/teardown_test.rb
CHANGED
data/test/test_test.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oktobertest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patricio Mac Adden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- test/scope_test.rb
|
80
80
|
- test/setup_test.rb
|
81
81
|
- test/teardown_test.rb
|
82
|
+
- test/test_test.rb
|
82
83
|
homepage: https://github.com/patriciomacadden/oktobertest
|
83
84
|
licenses:
|
84
85
|
- MIT
|
@@ -116,3 +117,4 @@ test_files:
|
|
116
117
|
- test/scope_test.rb
|
117
118
|
- test/setup_test.rb
|
118
119
|
- test/teardown_test.rb
|
120
|
+
- test/test_test.rb
|