pork 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/pork/inspect.rb +2 -2
- data/lib/pork/test.rb +1 -1
- data/lib/pork/version.rb +1 -1
- data/pork.gemspec +5 -3
- data/test/test_inspect.rb +3 -3
- data/test/test_should.rb +16 -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: aacd67d75401cc17261741e93e992df0ad2f3132
|
4
|
+
data.tar.gz: 67ff0980b2a2505762afd341d764c6fc3df8b98a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13f2ee44b10391b913fc9b967d21669d78fbb238a4935a7e95a0ef8086af402d4b4ef26dba1e94b7355ed561b773a48a64a411841604101eb2f285062de76501
|
7
|
+
data.tar.gz: 229a1171f3244870561f1205313bd472dacc26577997557fd00a3801b2b3f449137955d1feea5c2730979f6526fa6d06c24296a9e2d178d3ca1c03e4393b24da
|
data/CHANGES.md
CHANGED
data/lib/pork/inspect.rb
CHANGED
@@ -17,8 +17,8 @@ module Pork
|
|
17
17
|
elsif expect.kind_of?(Hash) && args.first.kind_of?(Hash)
|
18
18
|
if expect.inspect.size > 78
|
19
19
|
for_diff_hash(msg, negate,
|
20
|
-
Inspect.new(
|
21
|
-
merge(Inspect.new(
|
20
|
+
Inspect.new(false).diff_hash(expect, args.first).
|
21
|
+
merge(Inspect.new(true).diff_hash(args.first, expect)))
|
22
22
|
else
|
23
23
|
with_inline(Hash[expect.sort], msg, [Hash[args.first.sort]], negate)
|
24
24
|
end
|
data/lib/pork/test.rb
CHANGED
data/lib/pork/version.rb
CHANGED
data/pork.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: pork 1.0.
|
2
|
+
# stub: pork 1.0.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "pork"
|
6
|
-
s.version = "1.0.
|
6
|
+
s.version = "1.0.1"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["Lin Jen-Shin (godfat)"]
|
11
|
-
s.date = "2014-11-
|
11
|
+
s.date = "2014-11-21"
|
12
12
|
s.description = "Pork -- Simple and clean and modular testing library.\n\nInspired by [Bacon][].\n\n[Bacon]: https://github.com/chneukirchen/bacon"
|
13
13
|
s.email = ["godfat (XD) godfat.org"]
|
14
14
|
s.files = [
|
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
"test/test_nested.rb",
|
47
47
|
"test/test_parallel.rb",
|
48
48
|
"test/test_readme.rb",
|
49
|
+
"test/test_should.rb",
|
49
50
|
"test/test_shuffle.rb"]
|
50
51
|
s.homepage = "https://github.com/godfat/pork"
|
51
52
|
s.licenses = ["Apache License 2.0"]
|
@@ -58,6 +59,7 @@ Gem::Specification.new do |s|
|
|
58
59
|
"test/test_nested.rb",
|
59
60
|
"test/test_parallel.rb",
|
60
61
|
"test/test_readme.rb",
|
62
|
+
"test/test_should.rb",
|
61
63
|
"test/test_shuffle.rb"]
|
62
64
|
|
63
65
|
if s.respond_to? :specification_version then
|
data/test/test_inspect.rb
CHANGED
@@ -30,11 +30,11 @@ describe Pork::Inspect do
|
|
30
30
|
expect(f.message).eq <<-MSG.sub(/\AExpect/, 'Expect ').chop
|
31
31
|
Expect
|
32
32
|
\tHash with key path: "category_chats:0:chat_list:0:mentor"
|
33
|
-
|
33
|
+
{"timezone_str"=>"+00:00", "timezone_offset"=>0, "timezone_display"=>"UTC (+00:00)", "username"=>"menmen", "name"=>"Menmen", "level"=>"mentor", "rating"=>0.0, "role"=>"mentor", "avatar_url"=>"https://www.gravatar.com/avatar/556611444ab1143c8ad30206fda3926f?d=mm", "small_avatar_url"=>"https://www.gravatar.com/avatar/556611444ab1143c8ad30206fda3926f?d=mm?s=64&d=mm"}.==(
|
34
|
+
nil) to return true
|
34
35
|
|
35
36
|
\tHash with key path: "my:0"
|
36
|
-
{"mentee"=>{"timezone_str"=>"+00:00", "timezone_offset"=>0, "timezone_display"=>"UTC (+00:00)", "username"=>"example", "name"=>"Example", "level"=>"mentor", "rating"=>0.0, "role"=>"user", "avatar_url"=>"https://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?d=mm", "small_avatar_url"=>"https://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?d=mm?s=64&d=mm"}, "chatroom_id"=>"8c3dd9387dd30499a4053e07e4a41be4", "chatroom_firebase_id"=>"49c31f7444e199bdaea610dbe518d329"}
|
37
|
-
nil) to return true
|
37
|
+
nil.==({"mentee"=>{"timezone_str"=>"+00:00", "timezone_offset"=>0, "timezone_display"=>"UTC (+00:00)", "username"=>"example", "name"=>"Example", "level"=>"mentor", "rating"=>0.0, "role"=>"user", "avatar_url"=>"https://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?d=mm", "small_avatar_url"=>"https://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?d=mm?s=64&d=mm"}, "chatroom_id"=>"8c3dd9387dd30499a4053e07e4a41be4", "chatroom_firebase_id"=>"49c31f7444e199bdaea610dbe518d329"}) to return true
|
38
38
|
Additional Message
|
39
39
|
MSG
|
40
40
|
end
|
data/test/test_should.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
require 'pork/auto'
|
3
|
+
require 'pork/should'
|
4
|
+
|
5
|
+
describe Pork::Should do
|
6
|
+
def check_group_list level=9
|
7
|
+
Thread.new{ check_group_list(level - 1) }.join if level > 0
|
8
|
+
ok
|
9
|
+
end
|
10
|
+
|
11
|
+
would '#should' do
|
12
|
+
asserts = pork_stat.assertions
|
13
|
+
check_group_list
|
14
|
+
(pork_stat.assertions - asserts).should.eq 10
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lin Jen-Shin (godfat)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: muack
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- test/test_nested.rb
|
71
71
|
- test/test_parallel.rb
|
72
72
|
- test/test_readme.rb
|
73
|
+
- test/test_should.rb
|
73
74
|
- test/test_shuffle.rb
|
74
75
|
homepage: https://github.com/godfat/pork
|
75
76
|
licenses:
|
@@ -102,4 +103,5 @@ test_files:
|
|
102
103
|
- test/test_nested.rb
|
103
104
|
- test/test_parallel.rb
|
104
105
|
- test/test_readme.rb
|
106
|
+
- test/test_should.rb
|
105
107
|
- test/test_shuffle.rb
|