eetee 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/eetee.gemspec +1 -0
- data/lib/eetee/assertion_wrapper.rb +1 -1
- data/lib/eetee/ext/em.rb +6 -2
- data/lib/eetee/ext/time.rb +10 -3
- data/lib/eetee/runner.rb +9 -1
- data/lib/eetee/version.rb +1 -1
- metadata +8 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e4b2c9eab314d3f8a4dd45949b7f8aa0b934476a
|
4
|
+
data.tar.gz: 2b32b754c00d1153244e0fe6548c5d34de566f4f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0d2ca7efbb7d4b6495c44325c2c42359ac3b8f18e94b808e23d0e9b91f0a83ef9cc94361f16cb3c41957aab5ad33a1661cc712925b5a2be8d461134208b08c9f
|
7
|
+
data.tar.gz: 4854871ebc881c8042bfbf75f5016f7112c2f87c37ac70cddd7c3ea8ce3320090197cbec768e76ffa978d67ed64cd90f3e652cb6c65aa6d2d5549b0cced814ee
|
data/eetee.gemspec
CHANGED
@@ -65,7 +65,7 @@ module EEtee
|
|
65
65
|
ret = @object.__send__(name, *args, &block)
|
66
66
|
|
67
67
|
if !!ret == !!@invert
|
68
|
-
if ((name == :'==') || (name == :'!=')) && (
|
68
|
+
if ((name == :'==') || (name == :'!=')) && (@object.is_a?(::String) && args[0].is_a?(::String))
|
69
69
|
msg = "\n#{@object}\n#{name}\n#{args[0]}\n=> #{ret} (size: #{@object.size} / #{args[0].size})"
|
70
70
|
elsif args.empty?
|
71
71
|
msg = "#{@object.inspect}.#{name}() => #{ret}"
|
data/lib/eetee/ext/em.rb
CHANGED
@@ -36,6 +36,10 @@ module EEtee::EMSpec
|
|
36
36
|
wakeup
|
37
37
|
end
|
38
38
|
|
39
|
+
def new_fiber(&block)
|
40
|
+
Fiber.new(&block).resume
|
41
|
+
end
|
42
|
+
|
39
43
|
def run(&block)
|
40
44
|
if EMSpec.context_fiber == Fiber.current
|
41
45
|
block.call()
|
@@ -46,7 +50,8 @@ module EEtee::EMSpec
|
|
46
50
|
@_reporter.add_error( EEtee::Error.new(err, test))
|
47
51
|
end
|
48
52
|
|
49
|
-
|
53
|
+
new_fiber do
|
54
|
+
EMSpec.context_fiber = Fiber.current
|
50
55
|
begin
|
51
56
|
block.call()
|
52
57
|
EM::stop_event_loop
|
@@ -55,7 +60,6 @@ module EEtee::EMSpec
|
|
55
60
|
end
|
56
61
|
end
|
57
62
|
|
58
|
-
EMSpec.context_fiber.resume
|
59
63
|
end
|
60
64
|
|
61
65
|
end
|
data/lib/eetee/ext/time.rb
CHANGED
@@ -11,13 +11,20 @@ module EEteeTimeHelpers
|
|
11
11
|
##
|
12
12
|
# Freeze the time, in this block Time.now
|
13
13
|
# will always return the same value.
|
14
|
-
def freeze_time(t = Time.now)
|
14
|
+
def self.freeze_time(t = Time.now)
|
15
15
|
Time.stubs(:now).returns(t)
|
16
16
|
if block_given?
|
17
|
-
|
18
|
-
|
17
|
+
begin
|
18
|
+
yield
|
19
|
+
ensure
|
20
|
+
Time.unstub(:now)
|
21
|
+
end
|
19
22
|
end
|
20
23
|
end
|
24
|
+
|
25
|
+
def freeze_time(*args, &block)
|
26
|
+
EEteeTimeHelpers.freeze_time(*args, &block)
|
27
|
+
end
|
21
28
|
end
|
22
29
|
|
23
30
|
end
|
data/lib/eetee/runner.rb
CHANGED
@@ -40,7 +40,15 @@ module EEtee
|
|
40
40
|
else
|
41
41
|
@focus_mode = false
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
|
+
begin
|
45
|
+
instance_eval(data, path)
|
46
|
+
rescue => err
|
47
|
+
test = EEtee::Test.new("(Loading)", @reporter){}
|
48
|
+
@reporter.add_error( EEtee::Error.new(err, test))
|
49
|
+
|
50
|
+
end
|
51
|
+
|
44
52
|
else
|
45
53
|
puts "!!! file does not exists: #{path}"
|
46
54
|
end
|
data/lib/eetee/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eetee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Julien Ammous
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-05-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: term-ansicolor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -76,32 +73,25 @@ files:
|
|
76
73
|
- tests/simple/simple.rb
|
77
74
|
homepage: ''
|
78
75
|
licenses: []
|
76
|
+
metadata: {}
|
79
77
|
post_install_message:
|
80
78
|
rdoc_options: []
|
81
79
|
require_paths:
|
82
80
|
- lib
|
83
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
82
|
requirements:
|
86
|
-
- -
|
83
|
+
- - '>='
|
87
84
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
hash: 1275779178498727194
|
85
|
+
version: 1.9.3
|
92
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
-
none: false
|
94
87
|
requirements:
|
95
|
-
- -
|
88
|
+
- - '>='
|
96
89
|
- !ruby/object:Gem::Version
|
97
90
|
version: '0'
|
98
|
-
segments:
|
99
|
-
- 0
|
100
|
-
hash: 1275779178498727194
|
101
91
|
requirements: []
|
102
92
|
rubyforge_project:
|
103
|
-
rubygems_version:
|
93
|
+
rubygems_version: 2.0.3
|
104
94
|
signing_key:
|
105
|
-
specification_version:
|
95
|
+
specification_version: 4
|
106
96
|
summary: Another test framework
|
107
97
|
test_files: []
|