rwebspec 4.1.7 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,12 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 4.1.8
5
+ [Fixes] assert
6
+
7
+ 4.1.7
8
+ [Fixes] Default to browser on Mac
9
+
4
10
  4.1.6
5
11
  [Enhancement] Remove warning message MAX_MESSAGE_LENGTH redefined
6
12
  [Fixes] loading framework not aware of watir-webdriver
data/MIT-LICENSE CHANGED
File without changes
data/README CHANGED
File without changes
data/Rakefile CHANGED
@@ -78,7 +78,7 @@ end
78
78
  spec = Gem::Specification.new do |s|
79
79
  s.platform= Gem::Platform::RUBY
80
80
  s.name = "rwebspec"
81
- s.version = "4.1.7"
81
+ s.version = "4.2.0"
82
82
  s.summary = "Web application functional specification in Ruby"
83
83
  s.description = "Executable functional specification for web applications in RSpec syntax with Watir or Selenium"
84
84
 
@@ -97,11 +97,11 @@ spec = Gem::Specification.new do |s|
97
97
  s.files = s.files + Dir.glob( "test/**/*" )
98
98
  s.files = s.files + Dir.glob( "sample/**/*")
99
99
  s.files = s.files + Dir.glob( "docs/**/*" )
100
- s.add_dependency(%q<rspec>, [">= 2.10"])
101
- s.add_dependency(%q<rspec-core>, ["= 2.10.1"])
102
- s.add_dependency(%q<rspec-mocks>, ["= 2.10.1"])
103
- s.add_dependency(%q<rspec-expectations>, ["= 2.10.0"])
104
- s.add_dependency("commonwatir", ">= 3.0")
100
+ s.add_dependency(%q<rspec>, ["~> 2.13"])
101
+ s.add_dependency(%q<rspec-core>, ["~> 2.13.0"])
102
+ s.add_dependency(%q<rspec-mocks>, ["~> 2.13.0"])
103
+ s.add_dependency(%q<rspec-expectations>, ["~> 2.13"])
104
+ s.add_dependency("commonwatir", ">= 4.0.0")
105
105
  unless RUBY_PLATFORM =~ /mingw/
106
106
  s.add_dependency("selenium-webdriver")
107
107
  end
@@ -12,15 +12,14 @@ module RSpec
12
12
  module Core
13
13
  class ExampleGroup
14
14
 
15
- define_example_method :scenario
16
- define_example_method :story
17
- define_example_method :test_case
18
- define_example_method :use_case
19
- define_example_method :test
20
-
21
15
  class << self
22
16
  alias_method :specification, :describe
23
17
  alias_method :test_suite, :describe
18
+
19
+ alias_method :story, :it
20
+ alias_method :test_case, :it
21
+ alias_method :scenario, :it
22
+
24
23
  end
25
24
 
26
25
  end
@@ -443,8 +443,17 @@ module RWebSpec
443
443
 
444
444
  def assert_text_in_element(element_id, text)
445
445
  elem = element_by_id(element_id)
446
- assert_not_nil(elem.innerText, "element #{element_id} has no text")
447
- perform_assertion { assert(elem.innerText.include?(text), "the text #{text} not found in element #{element_id}") }
446
+ if RWebSpec.framework == "Watir"
447
+ assert_not_nil(elem.innerText, "element #{element_id} has no text")
448
+ perform_assertion { assert(elem.innerText.include?(text), "the text #{text} not found in element #{element_id}") }
449
+ else
450
+ perform_assertion {
451
+ # this works in text field
452
+ assert(element_value(elem).include?(text), "the text #{text} not found in element #{element_id}")
453
+ # TODO
454
+ }
455
+ end
456
+
448
457
  end
449
458
 
450
459
  # Use
@@ -481,13 +481,8 @@ module RWebSpec
481
481
  end
482
482
 
483
483
  def element_value(elementId)
484
- if is_firefox? then
485
- elem = element_by_id(elementId)
486
- elem ? elem.invoke('innerText') : nil
487
- else
488
- elem = element_by_id(elementId)
489
- elem ? elem.invoke('innerText') : nil
490
- end
484
+ elem = element_by_id(elementId)
485
+ elem ? elem.invoke('innerText') : nil
491
486
  end
492
487
 
493
488
  def element_source(elementId)
@@ -30,7 +30,7 @@ module RWebSpec
30
30
  # New Options:
31
31
  # :browser => :ie | :firefox | :chrome
32
32
  def open_browser(options = {})
33
- puts "[DEBUG] [SeleniumDriver] Callling open_browser #{options.inspect}"
33
+ # puts "[DEBUG] [SeleniumDriver] Callling open_browser #{options.inspect}"
34
34
 
35
35
  begin
36
36
  support_unicode
data/lib/rwebspec.rb CHANGED
@@ -16,7 +16,7 @@ end
16
16
  require 'rspec'
17
17
 
18
18
  unless defined? RWEBSPEC_VERSION
19
- RWEBSPEC_VERSION = RWEBUNIT_VERSION = "4.1.7"
19
+ RWEBSPEC_VERSION = RWEBUNIT_VERSION = "4.2.0"
20
20
  end
21
21
 
22
22
  $testwise_polling_interval = 1 # seconds
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rwebspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.7
4
+ version: 4.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,72 +9,72 @@ authors:
9
9
  autorequire: rwebspec
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '2.10'
21
+ version: '2.13'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: '2.10'
29
+ version: '2.13'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec-core
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - '='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 2.10.1
37
+ version: 2.13.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - '='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 2.10.1
45
+ version: 2.13.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rspec-mocks
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - '='
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 2.10.1
53
+ version: 2.13.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - '='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 2.10.1
61
+ version: 2.13.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rspec-expectations
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - '='
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 2.10.0
69
+ version: '2.13'
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - '='
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 2.10.0
77
+ version: '2.13'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: commonwatir
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ! '>='
84
84
  - !ruby/object:Gem::Version
85
- version: '3.0'
85
+ version: 4.0.0
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
- version: '3.0'
93
+ version: 4.0.0
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: selenium-webdriver
96
96
  requirement: !ruby/object:Gem::Requirement