regtest 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog +5 -0
  3. data/README.md +17 -6
  4. data/Rakefile +3 -4
  5. data/lib/regtest/task.rb +3 -2
  6. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abd6f8185f73664165e398cca0bef2b0939745a4
4
- data.tar.gz: 4365febeeb57037f5f07d8719307926364ca0764
3
+ metadata.gz: f285779cdef88936499612293c73cd6195f96296
4
+ data.tar.gz: ec1c2d6e64f81fb7da3b0b3f45e13bc67a08c6d5
5
5
  SHA512:
6
- metadata.gz: 9cc05a81f6ab89b4c049e495a7936ed43ca608cab90b13e2e02ad365f7565f97f73b798d5bd0f6d31db4fb1eefaef102a781727bb12a53296f893406d41a6653
7
- data.tar.gz: 2fb9fe69b682acfc98c660de78e1ad699da386c85e04a8ec60be3666ecf66e8e64d782fbbcd9081c9402ba4f687eb748a18bc5e1f56adf8b162db1d8db75838a
6
+ metadata.gz: 366a6e473d26cb35233b5fe23c4460724dbaef391226413dc49f023d7b55ad05d745d7b99401971444cdf60382c0aa9b1c2399caed4ec388700b963d2bbed5d8
7
+ data.tar.gz: d8f27f2758029cfbcd0388090e39ecafe5ed336810c9fc0f8ef317cd4f3172bdbc276e0c0e716505787d054e466dcb9796cb736ed3f8b54acb0721c579264b38
data/Changelog CHANGED
@@ -1,3 +1,8 @@
1
+ 0.4.0
2
+ Improve rake task:
3
+ - New constant REGTEST_FILES to define the Ruby files to work on.
4
+ - Include the regtest dir in $LOAD_PATH.
5
+
1
6
  0.3.0
2
7
  Printing some statistics.
3
8
  Using regtest itself.
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, boolean value, Symbol.
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
- Wether you run your examples manually
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
- to your Rakefile and you can run your samples with
72
- rake regtest
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
- existend) with the actual result values of your samples.
97
- So source code version control programm is the tool to determine
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/check_version'
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.3.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.'
@@ -1,5 +1,6 @@
1
+ REGTEST_FILES = FileList.new('regtest/**/*.rb')
2
+
1
3
  desc 'Run regression tests'
2
4
  task :regtest do
3
- filenames = FileList.new('regtest/*.rb')
4
- sh "ruby -I lib #{filenames.join(' ')}"
5
+ sh "ruby -I lib:regtest #{REGTEST_FILES}"
5
6
  end
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.3.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-02-07 00:00:00.000000000 Z
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: 1.8.1
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: 1.8.1
26
+ version: '2.2'
27
27
  description: Regression testing in Ruby.
28
28
  email: janfri26@gmail.com
29
29
  executables: []