test-factory 0.5.1 → 0.5.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/data_factory.rb +1 -0
- data/lib/test-factory/page_factory.rb +25 -0
- data/lib/test-factory.rb +1 -0
- data/test-factory.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjM5YzM1ZTU5OTNjNGI1OTQ2ODkxODg0ZTJlNDk2ZjIxMzZhMzRmNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjYwMmM4Y2IyMmE0NTgzNDBlYzMzYjZhMTM5OGM1OTE0MGYxMmIzYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDUxMTI3NTZmYTA2MWIxM2VkOGExOWU1MTNkOWI2NzVkMTNjYjNkZTNhMmNm
|
10
|
+
NTM5MGQ4YjBlNWY3MWVjMzM2YmUwM2FkYTViYzQzY2ZlYjVkZjY5NTQwZWRj
|
11
|
+
NmE4ZDc2YTA5NGIzNmFhMWE1YjA4ZWI0Yjk4ZDA0ZGNkNzBhYmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTc0ZmIzNzk2NDA3NjcwZWZiMWViNDg4ZDdjMTEyZTY2OTRkNDRiMTZmZDMw
|
14
|
+
NWI4OGM1Yzg5YzliNTQ4OTk5MmQxNjkyMDJjMWRlZDk3NDJjMDgxM2Q0MDUw
|
15
|
+
MjYzNTQwM2VkZTUyODkyNWQ5N2QzNjMyZTUzZWNiNWJmYWE3MmQ=
|
@@ -147,6 +147,31 @@ class PageFactory
|
|
147
147
|
elementize(:button, button_text, *alias_name)
|
148
148
|
end
|
149
149
|
|
150
|
+
# TestFactory doesn't allow defining a method in a child class
|
151
|
+
# with the same name as one already defined in a parent class.
|
152
|
+
# The thinking here is: "Out of sight, out of mind." Meaning:
|
153
|
+
# you or a team mate might not know or have forgotten that a given
|
154
|
+
# element is already defined in a parent class, and so define it
|
155
|
+
# again. TestFactory's restriction is there to help prevent this.
|
156
|
+
#
|
157
|
+
# However, in some cases you may have a child page class with a
|
158
|
+
# special circumstance, where the parent class's version of the
|
159
|
+
# method really doesn't apply, and you want to use the same method
|
160
|
+
# name in this child class because, really, no other method name
|
161
|
+
# would fit quite as well.
|
162
|
+
#
|
163
|
+
# The #undefine method is for those rare cases. Note: If you start
|
164
|
+
# using this method a lot then you should consider that a sign
|
165
|
+
# that perhaps you're putting too many method definitions into
|
166
|
+
# parent page classes.
|
167
|
+
#
|
168
|
+
# @example
|
169
|
+
# undefine :status, :doc_id => Undefines the specified methods in the current class
|
170
|
+
#
|
171
|
+
def undefine *methods
|
172
|
+
methods.each{ |m| undef_method m }
|
173
|
+
end
|
174
|
+
|
150
175
|
def inherited klass
|
151
176
|
klass.instance_eval {
|
152
177
|
|
data/lib/test-factory.rb
CHANGED
@@ -13,5 +13,6 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
require 'watir-webdriver'
|
16
|
+
require 'forwardable'
|
16
17
|
%w{foundry.rb data_factory.rb}.each { |f| require "#{File.dirname(__FILE__)}/test-factory/#{f}" }
|
17
18
|
Dir["#{File.dirname(__FILE__)}/test-factory/*.rb"].each {|f| require f }
|
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.5.
|
3
|
+
s.version = '0.5.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.5.
|
4
|
+
version: 0.5.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: 2014-
|
11
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: watir-webdriver
|