regtest 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/Changelog +5 -0
- data/README.md +17 -6
- data/Rakefile +3 -4
- data/lib/regtest/task.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f285779cdef88936499612293c73cd6195f96296
|
4
|
+
data.tar.gz: ec1c2d6e64f81fb7da3b0b3f45e13bc67a08c6d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366a6e473d26cb35233b5fe23c4460724dbaef391226413dc49f023d7b55ad05d745d7b99401971444cdf60382c0aa9b1c2399caed4ec388700b963d2bbed5d8
|
7
|
+
data.tar.gz: d8f27f2758029cfbcd0388090e39ecafe5ed336810c9fc0f8ef317cd4f3172bdbc276e0c0e716505787d054e466dcb9796cb736ed3f8b54acb0721c579264b38
|
data/Changelog
CHANGED
data/README.md
CHANGED
@@ -12,7 +12,9 @@ new tags in newer versions.
|
|
12
12
|
## Installation
|
13
13
|
|
14
14
|
Installing the gem with
|
15
|
+
|
15
16
|
gem install regtest
|
17
|
+
|
16
18
|
or put a copy of regtest.rb in your project.
|
17
19
|
|
18
20
|
## Using
|
@@ -27,6 +29,7 @@ The idea behind regtest is the following workflow:
|
|
27
29
|
|
28
30
|
A samples file is a simple Ruby script with one ore more samples,
|
29
31
|
for example
|
32
|
+
|
30
33
|
require 'regtest'
|
31
34
|
|
32
35
|
Regtest.sample 'String result' do
|
@@ -45,11 +48,12 @@ for example
|
|
45
48
|
The name of the sample (parameter of the `Regtest.sample` method)
|
46
49
|
and the results of the samples (return value of the block) are stored
|
47
50
|
in YAML format. So it should be a YAML friendly value as String,
|
48
|
-
Number,
|
51
|
+
Number, Boolean value, Symbol.
|
49
52
|
Results could also be an Array or Hash with such values.
|
50
53
|
|
51
54
|
You can also include Regtest to have the sample method at
|
52
55
|
top level.
|
56
|
+
|
53
57
|
require 'regtest'
|
54
58
|
include Regtest
|
55
59
|
|
@@ -63,13 +67,16 @@ in your Ruby application.
|
|
63
67
|
|
64
68
|
### Running Samples
|
65
69
|
|
66
|
-
|
70
|
+
Whether you run your examples manually
|
71
|
+
|
67
72
|
ruby -I lib regtest/*.rb
|
73
|
+
|
68
74
|
or using the Rake task of regtest:
|
69
75
|
Add the line
|
76
|
+
|
70
77
|
require 'regtest/task'
|
71
|
-
|
72
|
-
|
78
|
+
|
79
|
+
to your Rakefile and you can run your samples with `rake regtest`.
|
73
80
|
|
74
81
|
### Checking Results
|
75
82
|
|
@@ -77,13 +84,17 @@ The results of each samples file are stored as a collection of
|
|
77
84
|
YAML documents in a corresponding results file (YAML) per samples
|
78
85
|
file.
|
79
86
|
For example for the samples files
|
87
|
+
|
80
88
|
regtest/foo.rb
|
81
89
|
regtest/bar.rb
|
90
|
+
|
82
91
|
are the corresponding results files
|
92
|
+
|
83
93
|
regtest/foo.yml
|
84
94
|
regtest/bar.yml
|
85
95
|
|
86
96
|
So the content of the results file of the example above is
|
97
|
+
|
87
98
|
---
|
88
99
|
sample: String result
|
89
100
|
result: some text
|
@@ -93,8 +104,8 @@ So the content of the results file of the example above is
|
|
93
104
|
|
94
105
|
Each time you run one ore more samples file the corresponding
|
95
106
|
results file will be overwritten (or generated if not yet
|
96
|
-
|
97
|
-
So source code version control
|
107
|
+
existent) with the actual result values of your samples.
|
108
|
+
So source code version control program is the tool to determine
|
98
109
|
changes between older runs of the samples.
|
99
110
|
Therefore the samples file and their corresponding results files
|
100
111
|
should be taken under version control.
|
data/Rakefile
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
require 'rim'
|
2
|
-
require 'rim/
|
3
|
-
require 'rim/gem'
|
1
|
+
require 'rim/tire'
|
2
|
+
require 'rim/version'
|
4
3
|
|
5
4
|
$:.unshift 'lib'
|
6
5
|
require 'regtest/task'
|
7
6
|
|
8
7
|
Rim.setup do |p|
|
9
8
|
p.name = 'regtest'
|
10
|
-
p.version = '0.
|
9
|
+
p.version = '0.4.0'
|
11
10
|
p.authors = 'Jan Friedrich'
|
12
11
|
p.email = 'janfri26@gmail.com'
|
13
12
|
p.summary = 'Regression testing in Ruby.'
|
data/lib/regtest/task.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regtest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Friedrich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rim
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '2.2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '2.2'
|
27
27
|
description: Regression testing in Ruby.
|
28
28
|
email: janfri26@gmail.com
|
29
29
|
executables: []
|