auto_test 0.0.8.9.0 → 0.0.9.1
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.
- data/lib/auto_test.rb +2 -6
- data/lib/auto_test/version.rb +1 -1
- data/lib/spec/requests/auto_spec.rb +0 -2
- data/lib/tasks/auto_test.rb +16 -9
- metadata +2 -2
data/lib/auto_test.rb
CHANGED
@@ -16,12 +16,8 @@ module AutoTest
|
|
16
16
|
self.configuration ||= Configuration.new
|
17
17
|
yield(configuration)
|
18
18
|
end
|
19
|
-
|
20
|
-
|
21
|
-
path = path[0..path.size-13]
|
22
|
-
puts path
|
23
|
-
exec("rspec '#{path}/../spec/requests/auto_spec.rb' -o '#{path}/../../log/rspec.txt'")
|
24
|
-
end
|
19
|
+
|
20
|
+
|
25
21
|
|
26
22
|
class Configuration
|
27
23
|
def initialize
|
data/lib/auto_test/version.rb
CHANGED
data/lib/tasks/auto_test.rb
CHANGED
@@ -4,16 +4,19 @@ namespace :auto_test do
|
|
4
4
|
task :test do
|
5
5
|
puts "Running auto_test..."
|
6
6
|
sh "rails server -e test -p 3002 -d"
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
path = sh "gem which auto_test"
|
8
|
+
path = path[0..path.size-13]
|
9
|
+
sh "rspec '#{path}/../spec/requests/auto_spec.rb' -o '#{path}/../../log/rspec.txt'")
|
10
10
|
Rake::Task[:error_calc].invoke
|
11
11
|
Rake::Task[:stop].invoke
|
12
12
|
end
|
13
13
|
|
14
14
|
desc "calculating the errors"
|
15
15
|
task :error_calc do
|
16
|
-
|
16
|
+
path = sh "gem which auto_test"
|
17
|
+
path = path[0..path.size-13]
|
18
|
+
sh "rm '#{path}/../log/rspec.txt'"
|
19
|
+
err = File.read("#{path}/../log/errors.log")
|
17
20
|
if err.to_i > 0 then
|
18
21
|
puts "Do you want to see the error-path in firefox? Type yes/no:"
|
19
22
|
a = STDIN.gets.chomp
|
@@ -25,23 +28,27 @@ namespace :auto_test do
|
|
25
28
|
|
26
29
|
desc "Reducing the error path"
|
27
30
|
task :reduce_errors do
|
31
|
+
path = sh "gem which auto_test"
|
32
|
+
path = path[0..path.size-13]
|
28
33
|
puts "Reducing the error path, this could take a while..."
|
29
|
-
sh "rspec
|
30
|
-
sh "rm 'log/reduce_err.txt'"
|
34
|
+
sh "rspec #{path}/spec/requests/error_reduction_spec.rb -o '#{path}/../log/reduce_err.txt'"
|
35
|
+
sh "rm '#{path}/../log/reduce_err.txt'"
|
31
36
|
Rake::Task[:start_action_path].invoke
|
32
37
|
end
|
33
38
|
|
34
39
|
desc "starting the simulation"
|
35
40
|
task :start_action_path do
|
41
|
+
path = sh "gem which auto_test"
|
42
|
+
path = path[0..path.size-13]
|
36
43
|
# paths = File.new("lib/auto_test/log/new_path.log")
|
37
44
|
# n = 0
|
38
45
|
# while line = paths.gets do
|
39
46
|
# n = n + 1
|
40
47
|
# end
|
41
48
|
# puts "Error path reduced.There are #{n} paths to be visited."
|
42
|
-
|
43
|
-
|
44
|
-
ruby
|
49
|
+
puts "Press Enter to see the path in Firefox! "
|
50
|
+
STDIN.gets
|
51
|
+
ruby "#{path}/simulation.rb"
|
45
52
|
end
|
46
53
|
|
47
54
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: auto_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.9.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Maike Hargens
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-10-
|
13
|
+
date: 2012-10-03 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faker
|