test-factory 0.3.1 → 0.3.2
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 +8 -8
- data/lib/test-factory/gem_ext.rb +2 -3
- data/lib/test-factory/string_factory.rb +10 -0
- data/test-factory-0.3.1.gem +0 -0
- data/test-factory.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDVhZDU2MWVhOGYxZWM3MzU2MWMxYzI0YjRiM2ZhMmM0MWYxY2RkOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Njk4MDRjMTRmNTgxZDIyY2IwNGVkZGNmM2Q2NGJkOTA0NTc2YWY4YQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzRhYjVhMzM3ZjU3NDM0NGFhZjBjYWZiZWQyZTgwMTcxZmU3YzJmZGYyNzIx
|
10
|
+
ZTgyOGM4ZjQ3NzljZWM4YThhZWQxODAxYmRlZTc4YmViZjI4MDUxN2YxNTQw
|
11
|
+
MzQ4MDUzYmZlN2IyMWVhZDFlZmQ5OTU5MGZmN2EyNjgyNzY0Yjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODFmOTA4ODRiNGRhNjg2NWRhMmVkNjAzNDY0Nzg4ZmNjMGRkYzJlZDk1NjY2
|
14
|
+
NDk4ZjAzZGEyZWUwNDhmYzc3NTAzM2ZiNDFkNmI5YTVlMGU5OTNmOWMzZGRj
|
15
|
+
MTM4OTY1ZTYzNWZjMzNlNjdjYjlhNjBhZjRlZWI2YmY5YjMzOTg=
|
data/lib/test-factory/gem_ext.rb
CHANGED
@@ -183,9 +183,8 @@ module Watir
|
|
183
183
|
private
|
184
184
|
|
185
185
|
def select_at_random
|
186
|
-
text_array =
|
187
|
-
|
188
|
-
text_array.delete_if { |text| text=='select' || text=='' }
|
186
|
+
text_array = options.map { |opt| opt.text }
|
187
|
+
text_array.delete_if { |text| text=~/^select(.?)$/i || text=='' }
|
189
188
|
item = text_array.sample
|
190
189
|
select item
|
191
190
|
item
|
@@ -85,6 +85,16 @@ module StringFactory
|
|
85
85
|
s.to_s
|
86
86
|
end
|
87
87
|
|
88
|
+
# Returns a String containing a number with two decimal places, for creation
|
89
|
+
# of dollar values.
|
90
|
+
# @param max [Integer] The highest allowable dollar amount
|
91
|
+
# @example
|
92
|
+
# random_dollar_value(100) => '44.89'
|
93
|
+
#
|
94
|
+
def random_dollar_value(max)
|
95
|
+
"#{rand(max)}.#{rand(99)}"
|
96
|
+
end
|
97
|
+
|
88
98
|
# Returns a block of text (of the specified type, see below) containing
|
89
99
|
# the specified number of "words" (each containing between 1 and 16 chars)
|
90
100
|
# randomly spread across the specified number of lines (note that
|
Binary file
|
data/test-factory.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'test-factory'
|
3
|
-
s.version = '0.3.
|
3
|
+
s.version = '0.3.2'
|
4
4
|
s.summary = %q{rSmart's framework for creating automated testing scripts}
|
5
5
|
s.description = %q{This gem provides a set of modules and methods to help quickly and DRYly create a test automation framework using Ruby and Watir (or watir-webdriver).}
|
6
6
|
s.files = Dir.glob("**/**/**")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abraham Heward
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: watir-webdriver
|
@@ -46,6 +46,7 @@ files:
|
|
46
46
|
- lib/test-factory.rb
|
47
47
|
- LICENSE
|
48
48
|
- README.md
|
49
|
+
- test-factory-0.3.1.gem
|
49
50
|
- test-factory.gemspec
|
50
51
|
homepage: https://github.com/rSmart
|
51
52
|
licenses: []
|