pork 0.1.0 → 0.9.0

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.
@@ -1,14 +1,12 @@
1
1
 
2
- require 'pork'
2
+ require 'pork/auto'
3
3
 
4
- module M
5
- def m
6
- object_id
7
- end
8
- end
9
-
10
- Pork::API.describe 'A' do
11
- include M
4
+ describe 'A' do
5
+ include Module.new{
6
+ def m
7
+ object_id
8
+ end
9
+ }
12
10
 
13
11
  def f
14
12
  object_id
@@ -20,20 +18,40 @@ Pork::API.describe 'A' do
20
18
  lambda{ f.should.eq '' }.should.raise Pork::Failure
21
19
  end
22
20
 
21
+ copy do
22
+ def t
23
+ true
24
+ end
25
+
26
+ would do
27
+ t.should.eq true
28
+ end
29
+ end
30
+
31
+ paste
32
+
23
33
  describe 'B' do
24
34
  would 'have the same context' do
25
- f.should == m
35
+ f.should.eq m
26
36
  m.should.not.kind_of? String
27
37
  lambda{ throw :halt }.should.throw :halt
28
38
  lambda{ lambda{ throw :halt }.should.not.throw :halt }.
29
39
  should.raise Pork::Failure
30
40
  end
41
+
42
+ paste
43
+
44
+ would do
45
+ t.should.eq true
46
+ end
31
47
  end
32
48
 
33
49
  would 'skip' do
34
50
  skip
35
- true.should.eq false
51
+ should.flunk
36
52
  end
37
53
  end
38
54
 
39
- Pork.report
55
+ would 'also work on top-level' do
56
+ true.should.eq true
57
+ end
@@ -0,0 +1,14 @@
1
+
2
+ require 'pork/auto'
3
+ require 'uri'
4
+
5
+ describe 'README.md' do
6
+ File.read("#{File.dirname(File.expand_path(__FILE__))}/../README.md").
7
+ scan(%r{``` ruby\nrequire 'pork/auto'\n(.+?)\n```}m).
8
+ each.with_index do |(code), index|
9
+ would 'pass from README.md #%02d' % index do
10
+ Module.new{ extend Pork::API; instance_eval(code) }
11
+ ok
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,17 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.9.0
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-07-09 00:00:00.000000000 Z
11
+ date: 2014-07-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
- [Bacon][] reimplemented in an even more lightweight manner.
14
+ Pork -- Simple and clean and modular testing library.
15
+
16
+ [Bacon][] reimplemented around 250 lines of code.
15
17
 
16
18
  [Bacon]: https://github.com/chneukirchen/bacon
17
19
  email:
@@ -20,20 +22,22 @@ executables: []
20
22
  extensions: []
21
23
  extra_rdoc_files: []
22
24
  files:
25
+ - ".gitignore"
23
26
  - ".gitmodules"
24
27
  - ".travis.yml"
28
+ - CHANGES.md
25
29
  - LICENSE
26
30
  - README.md
27
31
  - Rakefile
28
32
  - lib/pork.rb
29
- - lib/pork/task.rb
33
+ - lib/pork/auto.rb
30
34
  - lib/pork/version.rb
31
- - pkg/pork-0.1.0.gem
32
35
  - pork.gemspec
33
36
  - task/README.md
34
37
  - task/gemgem.rb
35
38
  - test/test_bacon.rb
36
39
  - test/test_nested.rb
40
+ - test/test_readme.rb
37
41
  homepage: https://github.com/godfat/pork
38
42
  licenses:
39
43
  - Apache License 2.0
@@ -57,7 +61,8 @@ rubyforge_project:
57
61
  rubygems_version: 2.3.0
58
62
  signing_key:
59
63
  specification_version: 4
60
- summary: "[Bacon][] reimplemented in an even more lightweight manner."
64
+ summary: Pork -- Simple and clean and modular testing library.
61
65
  test_files:
62
66
  - test/test_bacon.rb
63
67
  - test/test_nested.rb
68
+ - test/test_readme.rb
@@ -1,2 +0,0 @@
1
-
2
-
Binary file