sapphire 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sapphire.rb +1 -0
- data/lib/sapphire/DSL/Browser/Verbs/Complete.rb +7 -3
- data/lib/sapphire/Testing.rb +1 -0
- data/lib/sapphire/Testing/Coverage/BusinessRule.rb +28 -0
- data/lib/sapphire/Testing/Coverage/Covers.rb +9 -0
- data/lib/sapphire/Testing/Coverage/Feature.rb +32 -0
- data/lib/sapphire/Testing/Coverage/Test.rb +21 -0
- data/lib/sapphire/version.rb +3 -3
- metadata +11 -7
data/lib/sapphire.rb
CHANGED
data/lib/sapphire/Testing.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
module Sapphire
|
2
|
+
module Testing
|
3
|
+
module Coverage
|
4
|
+
def BusinessRule(hash, &block)
|
5
|
+
$features.last.AddRule(BusinessRule.new(hash, block))
|
6
|
+
end
|
7
|
+
|
8
|
+
class BusinessRule
|
9
|
+
|
10
|
+
attr_reader :token
|
11
|
+
attr_reader :priority
|
12
|
+
attr_reader :tests
|
13
|
+
|
14
|
+
def initialize(hash, block)
|
15
|
+
@token = hash.keys.first
|
16
|
+
@priority = hash[hash.keys.first]
|
17
|
+
@tests = []
|
18
|
+
block.call
|
19
|
+
end
|
20
|
+
|
21
|
+
def AddTest(test)
|
22
|
+
@tests << test
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Sapphire
|
2
|
+
module Testing
|
3
|
+
module Coverage
|
4
|
+
def Feature(token, &block)
|
5
|
+
$features ||= []
|
6
|
+
$features << Feature.new(token)
|
7
|
+
block.call
|
8
|
+
end
|
9
|
+
|
10
|
+
class Feature
|
11
|
+
|
12
|
+
attr_reader :business_rules
|
13
|
+
attr_reader :token
|
14
|
+
|
15
|
+
def initialize(token)
|
16
|
+
@token = token
|
17
|
+
@business_rules = []
|
18
|
+
end
|
19
|
+
|
20
|
+
def AddRule(business_rule)
|
21
|
+
@business_rules << business_rule
|
22
|
+
end
|
23
|
+
|
24
|
+
def AddTest(test)
|
25
|
+
@business_rules.last().AddTest test
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Sapphire
|
2
|
+
module Testing
|
3
|
+
module Coverage
|
4
|
+
def Test(token, hash)
|
5
|
+
$features.last().AddTest(Test.new(token, hash))
|
6
|
+
end
|
7
|
+
|
8
|
+
class Test
|
9
|
+
|
10
|
+
attr_reader :token
|
11
|
+
attr_reader :type
|
12
|
+
|
13
|
+
def initialize(token, hash)
|
14
|
+
@token = token
|
15
|
+
@type = hash[hash.keys.first]
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/sapphire/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Sapphire
|
2
|
-
VERSION = "0.5.
|
3
|
-
end
|
1
|
+
module Sapphire
|
2
|
+
VERSION = "0.5.8"
|
3
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sapphire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-18 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: selenium-webdriver
|
16
|
-
requirement: &
|
16
|
+
requirement: &10100448 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *10100448
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: colorize
|
27
|
-
requirement: &
|
27
|
+
requirement: &10100196 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *10100196
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: Platform
|
38
|
-
requirement: &
|
38
|
+
requirement: &10099944 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *10099944
|
47
47
|
description: An automated web acceptance test framework for non-technical resources
|
48
48
|
using selenium-wedriver.
|
49
49
|
email:
|
@@ -146,6 +146,10 @@ files:
|
|
146
146
|
- lib/sapphire/TeamCity/TeamCityReporter.rb
|
147
147
|
- lib/sapphire/TeamCity.rb
|
148
148
|
- lib/sapphire/Testing/ConsoleReporter.rb
|
149
|
+
- lib/sapphire/Testing/Coverage/BusinessRule.rb
|
150
|
+
- lib/sapphire/Testing/Coverage/Covers.rb
|
151
|
+
- lib/sapphire/Testing/Coverage/Feature.rb
|
152
|
+
- lib/sapphire/Testing/Coverage/Test.rb
|
149
153
|
- lib/sapphire/Testing/Executable.rb
|
150
154
|
- lib/sapphire/Testing/ExpectationException.rb
|
151
155
|
- lib/sapphire/Testing/HtmlReporter.rb
|