sapphire 0.7.20 → 0.7.21

Sign up to get free protection for your applications and to get access to all the features.
data/bin/sapphire CHANGED
@@ -4,6 +4,7 @@ require 'rubygems'
4
4
  require 'sapphire'
5
5
  include Sapphire::Sapphire
6
6
 
7
+ $console = $stdout
7
8
  $reporters = []
8
9
  $instances = []
9
10
 
@@ -37,9 +38,7 @@ def Process()
37
38
  $instances.last.file = @file if $instances.last.is_a? HtmlReporter
38
39
  end
39
40
 
40
- if $instances.empty?
41
- $instances << ConsoleReporter.new()
42
- end
41
+ $instances << ConsoleReporter.new()
43
42
 
44
43
  if Runner.instance.test_plans.count > 0
45
44
  Report do |x| x.BeginTesting end
@@ -67,7 +66,7 @@ if @file.nil?
67
66
  Process()
68
67
  else
69
68
  File.open(@file, 'w') do |f|
70
- $stdout = f
69
+ $output = f
71
70
  Process()
72
71
  end
73
72
  end
@@ -47,15 +47,7 @@ module Sapphire
47
47
  end
48
48
 
49
49
  def execute
50
- #Report do |x| x.BeginTesting end
51
- #$stdout.puts ""
52
- #begin
53
50
  @block.call
54
- #rescue => e
55
- # Report do |x| x.TestFailed TestPlanResult.new('fail', self, e.message, e.backtrace, 0) end
56
- #end
57
- #Report do |x| x.TestingComplete end
58
- #Report do |x| x.OutputResults end
59
51
  end
60
52
 
61
53
  def Report(&block)
@@ -9,7 +9,8 @@ module Sapphire
9
9
  @pending_count = 0
10
10
  @broken_count = 0
11
11
  @test_count = 0
12
- @output = $stdout
12
+ $console ||= $stdout
13
+ @output = $console
13
14
  end
14
15
 
15
16
  def ScenarioStart(scenario)
@@ -15,7 +15,8 @@ module Sapphire
15
15
  @pending_count = 0
16
16
  @broken_count = 0
17
17
  @test_count = 0
18
- @output = $stdout
18
+ $output ||= $stdout
19
+ @output = $output
19
20
  @file = ""
20
21
  end
21
22
 
@@ -1,3 +1,3 @@
1
1
  module Sapphire
2
- VERSION = "0.7.20"
2
+ VERSION = "0.7.21"
3
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.7.20
4
+ version: 0.7.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-23 00:00:00.000000000Z
12
+ date: 2012-03-26 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: selenium-webdriver
16
- requirement: &9964308 !ruby/object:Gem::Requirement
16
+ requirement: &9679440 !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: *9964308
24
+ version_requirements: *9679440
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: colorize
27
- requirement: &9964056 !ruby/object:Gem::Requirement
27
+ requirement: &9679188 !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: *9964056
35
+ version_requirements: *9679188
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: Platform
38
- requirement: &9963804 !ruby/object:Gem::Requirement
38
+ requirement: &9678936 !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: *9963804
46
+ version_requirements: *9678936
47
47
  description: An automated web acceptance test framework for non-technical resources
48
48
  using selenium-wedriver.
49
49
  email: