pad_gem 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53235b9f065f6db3431f60b8f9d5e90f683e655d
4
- data.tar.gz: 493738ba0b97767e49f029649d665f3122aa4858
3
+ metadata.gz: 709398b33946d8d272690e7eb0c51ddbaf3c0d66
4
+ data.tar.gz: e83c48f9fa1bfcc35c54d52e3cfbb5bf38198159
5
5
  SHA512:
6
- metadata.gz: 4ad62c5697d9d09b226c1e396be8a05bca138a7cc76d06c59a0755704c8301504fff16949d61cf078047d5106ba48774566307f533aae79a6484220fceeb2f9e
7
- data.tar.gz: dadd6b451c4c9eab77c3c8a1ccc2bc2eeeed33fb3442c45ecd600ab26d4ce512b0e49fe6d76058c77f3995137dca04ec9100b5849144ac12b4a3ac8f6741ebc3
6
+ metadata.gz: f81c61f36f8af974aa0d34fc8b185e08a8d8898cccefb1d46ec1e31f90573df8683051ed73213143def6303b2d400fe4083b6d761bce843e98df3f6602d87fb4
7
+ data.tar.gz: 4fb4cf3a6dfc0a31201acd30efb69cb7a7a04b82ddf027950a8446b64c6f315661076e51ff132d6f383749a38085db2774fabf4fedc011ebd75913a6ed05d7df
@@ -0,0 +1,17 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'pad_utils'
4
+
5
+ puts
6
+ name = PadUtils.question_menu("How do you want to name your manual test?")
7
+ name = PadUtils.sanitize name
8
+
9
+ underscored = PadUtils.underscore name
10
+ camel = PadUtils.camel_case underscored
11
+ file_name = "#{underscored}_test.rb"
12
+
13
+ PadUtils.copy_file("../template/template_manual.rb", file_name)
14
+ PadUtils.replace_in_file(file_name, /CLASS_TEST_NAME/, "#{camel}Test")
15
+ PadUtils.replace_in_file(file_name, /TEST_NAME/, camel)
16
+
17
+ puts
@@ -0,0 +1,23 @@
1
+ require_relative '../template/test'
2
+
3
+ class SampleTest < Test
4
+
5
+ def prepare
6
+ # Add test preparation here
7
+ end
8
+
9
+ def run_test
10
+ puts "This is a sample test!"
11
+ @notes << "Sample note"
12
+ end
13
+
14
+ def cleanup
15
+ # Add cleanup code here
16
+ end
17
+
18
+ end
19
+
20
+ # Test name
21
+ test_name = "Sample"
22
+ current_test = SampleTest.new(test_name)
23
+ current_test.run
@@ -0,0 +1,30 @@
1
+ require_relative '../template/test'
2
+
3
+ class CLASS_TEST_NAME < Test
4
+
5
+ def prepare
6
+ # Add test preparation here
7
+ end
8
+
9
+ def run_test
10
+ # Test code for TEST_NAME goes here
11
+ #
12
+ # Runtime errors will be handled by a Rescue in the parent class
13
+ #
14
+ # You can add error messages to @errors
15
+ # example: @errors << "Some error message"
16
+ # You can also add notes to @notes
17
+ # example: @notes << "Some note"
18
+ puts "TEST_NAME not implemented"
19
+ end
20
+
21
+ def cleanup
22
+ # Add cleanup code here
23
+ end
24
+
25
+ end
26
+
27
+ # Test name
28
+ test_name = "TEST_NAME"
29
+ current_test = CLASS_TEST_NAME.new(test_name)
30
+ current_test.run
@@ -1,3 +1,5 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
1
3
  require 'pad_utils'
2
4
  require 'PADGEM_GEM_RUBY_NAME'
3
5
 
@@ -30,7 +30,7 @@ module PadGem
30
30
  "spec.executables",
31
31
  in_file: "#{target_path}/#{options[:gem_ruby_name]}.gemspec",
32
32
  new_value: ""
33
- )
33
+ )
34
34
  end
35
35
 
36
36
  # Return success
@@ -92,6 +92,9 @@ module PadGem
92
92
  # test/template/test.rb
93
93
  PadUtils.replace_in_file("test/template/test.rb", /PADGEM_GEM_RUBY_NAME/, options[:gem_ruby_name])
94
94
 
95
+ # test/manual/manual.rb
96
+ PadUtils.replace_in_file("test/manual/manual.rb", /PADGEM_GEM_RUBY_NAME/, options[:gem_ruby_name])
97
+
95
98
  end
96
99
  end
97
100
 
@@ -1,3 +1,3 @@
1
1
  module PadGem
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pad_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Schuele
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-20 00:00:00.000000000 Z
11
+ date: 2016-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pad_utils
@@ -55,8 +55,11 @@ files:
55
55
  - lib/foundation/test/add_test.rb
56
56
  - lib/foundation/test/fixtures/.keep
57
57
  - lib/foundation/test/how_to_test.txt
58
+ - lib/foundation/test/manual/add_manual_test.rb
59
+ - lib/foundation/test/manual/sample_test.rb
58
60
  - lib/foundation/test/results/.keep
59
61
  - lib/foundation/test/template/template.rb
62
+ - lib/foundation/test/template/template_manual.rb
60
63
  - lib/foundation/test/template/test.rb
61
64
  - lib/foundation/test/test_runner.rb
62
65
  - lib/foundation/test/units/sample_test.rb