regtest 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +16 -0
- data/lib/regtest/task.rb +5 -0
- data/lib/regtest.rb +51 -0
- metadata +59 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2e1974c1d29f708f32cf6a925f31b6ef2ac720a1
|
4
|
+
data.tar.gz: 8950be942925cfe35c1e9e0a5e055206521f4503
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b505870425e163caab98808833654ae5a30ce87709ef5d7aab71a418b3cbb5b629416f1f11e1e6a2561a170326d08dd05534a95d3b59aac8e45e59918d7270e5
|
7
|
+
data.tar.gz: 3c021a4eda108e64df737d0696d3b9899f8c21ce92a5f9228fe98ea24adc0392556161dce854739ef214fdf4fe4bdf32f5b806e8b9b74df5c041ca70ccade43c
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rim'
|
2
|
+
require 'rim/gem'
|
3
|
+
|
4
|
+
Rim.setup do |p|
|
5
|
+
p.name = 'regtest'
|
6
|
+
p.version = '0.1.0'
|
7
|
+
p.authors = 'Jan Friedrich'
|
8
|
+
p.email = 'janfri26@gmail.com'
|
9
|
+
p.summary = 'Regression testing in Ruby.'
|
10
|
+
p.description = p.summary
|
11
|
+
p.homepage = 'http://gitorious.org/regtest'
|
12
|
+
end
|
13
|
+
|
14
|
+
task :test do
|
15
|
+
# nothing
|
16
|
+
end
|
data/lib/regtest/task.rb
ADDED
data/lib/regtest.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
#
|
2
|
+
# Regtest - Regression testing for Ruby
|
3
|
+
#
|
4
|
+
# Copyright 2014 by Jan Friedrich (janfri26@gmail.com)
|
5
|
+
# License: Rubys License
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'yaml'
|
9
|
+
|
10
|
+
module Regtest
|
11
|
+
|
12
|
+
@@results = {}
|
13
|
+
|
14
|
+
def sample name
|
15
|
+
h = {}
|
16
|
+
name = name.to_s if name.kind_of?(Symbol)
|
17
|
+
h['sample'] = name
|
18
|
+
begin
|
19
|
+
h['result'] = yield
|
20
|
+
rescue Exception => e
|
21
|
+
h['exception'] = e.message
|
22
|
+
end
|
23
|
+
output_filename = caller.first.split(/:/).first.sub(/\.rb/, '') << '.yml'
|
24
|
+
unless @@results[output_filename]
|
25
|
+
puts unless @@results.empty?
|
26
|
+
puts File.basename(output_filename, '.yml')
|
27
|
+
@@results[output_filename] = []
|
28
|
+
end
|
29
|
+
@@results[output_filename] << h
|
30
|
+
print '.'; $stdout.flush
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.results
|
34
|
+
@@results
|
35
|
+
end
|
36
|
+
|
37
|
+
module_function :sample
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
at_exit do
|
42
|
+
ARGV.each {|a| load a}
|
43
|
+
puts
|
44
|
+
Regtest.results.each_pair do |filename,arr|
|
45
|
+
File.open(filename, 'w') do |f|
|
46
|
+
arr.each do |h|
|
47
|
+
f.write h.to_yaml
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: regtest
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jan Friedrich
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rim
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.7.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.7.0
|
27
|
+
description: Regression testing in Ruby.
|
28
|
+
email: janfri26@gmail.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- Rakefile
|
34
|
+
- lib/regtest.rb
|
35
|
+
- lib/regtest/task.rb
|
36
|
+
homepage: http://gitorious.org/regtest
|
37
|
+
licenses: []
|
38
|
+
metadata: {}
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options: []
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
requirements: []
|
54
|
+
rubyforge_project:
|
55
|
+
rubygems_version: 2.2.0
|
56
|
+
signing_key:
|
57
|
+
specification_version: 4
|
58
|
+
summary: Regression testing in Ruby.
|
59
|
+
test_files: []
|