mattwynne-cucover 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/.gitignore +6 -0
  2. data/Licence.txt +22 -0
  3. data/README.markdown +23 -7
  4. data/Rakefile +86 -0
  5. data/VERSION +1 -0
  6. data/bin/cucover +1 -1
  7. data/cucover.gemspec +305 -0
  8. data/examples/self_test/rails/.gitignore +2 -0
  9. data/examples/self_test/rails/README +256 -0
  10. data/examples/self_test/rails/Rakefile +10 -0
  11. data/examples/self_test/rails/app/controllers/application.rb +2 -0
  12. data/examples/self_test/rails/app/controllers/widgets_controller.rb +2 -0
  13. data/examples/self_test/rails/app/views/widgets/index.html.erb +1 -0
  14. data/examples/self_test/rails/config/boot.rb +109 -0
  15. data/examples/self_test/rails/config/database.yml +19 -0
  16. data/examples/self_test/rails/config/environment.rb +68 -0
  17. data/examples/self_test/rails/config/environments/development.rb +17 -0
  18. data/examples/self_test/rails/config/environments/production.rb +22 -0
  19. data/examples/self_test/rails/config/environments/test.rb +22 -0
  20. data/examples/self_test/rails/config/routes.rb +43 -0
  21. data/examples/self_test/rails/db/test.sqlite3 +0 -0
  22. data/examples/self_test/rails/features/see_widgets.feature +7 -0
  23. data/examples/self_test/rails/features/step_definitions/env.rb +0 -0
  24. data/examples/self_test/rails/features/step_definitions/webrat_steps.rb +7 -0
  25. data/examples/self_test/rails/features/support/env.rb +17 -0
  26. data/examples/self_test/rails/lib/tasks/cucumber.rake +15 -0
  27. data/examples/self_test/rails/public/404.html +30 -0
  28. data/examples/self_test/rails/public/422.html +30 -0
  29. data/examples/self_test/rails/public/500.html +30 -0
  30. data/examples/self_test/rails/public/dispatch.cgi +10 -0
  31. data/examples/self_test/rails/public/dispatch.fcgi +24 -0
  32. data/examples/self_test/rails/public/dispatch.rb +10 -0
  33. data/examples/self_test/rails/public/favicon.ico +0 -0
  34. data/examples/self_test/rails/public/images/rails.png +0 -0
  35. data/examples/self_test/rails/public/index.html +274 -0
  36. data/examples/self_test/rails/public/javascripts/application.js +2 -0
  37. data/examples/self_test/rails/public/javascripts/controls.js +963 -0
  38. data/examples/self_test/rails/public/javascripts/dragdrop.js +972 -0
  39. data/examples/self_test/rails/public/javascripts/effects.js +1120 -0
  40. data/examples/self_test/rails/public/javascripts/prototype.js +4225 -0
  41. data/examples/self_test/rails/public/robots.txt +5 -0
  42. data/examples/self_test/rails/script/about +4 -0
  43. data/examples/self_test/rails/script/console +3 -0
  44. data/examples/self_test/rails/script/cucumber +8 -0
  45. data/examples/self_test/rails/script/dbconsole +3 -0
  46. data/examples/self_test/rails/script/destroy +3 -0
  47. data/examples/self_test/rails/script/generate +3 -0
  48. data/examples/self_test/rails/script/performance/benchmarker +3 -0
  49. data/examples/self_test/rails/script/performance/profiler +3 -0
  50. data/examples/self_test/rails/script/performance/request +3 -0
  51. data/examples/self_test/rails/script/plugin +3 -0
  52. data/examples/self_test/rails/script/process/inspector +3 -0
  53. data/examples/self_test/rails/script/process/reaper +3 -0
  54. data/examples/self_test/rails/script/process/spawner +3 -0
  55. data/examples/self_test/rails/script/runner +3 -0
  56. data/examples/self_test/rails/script/server +3 -0
  57. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/.specification +148 -0
  58. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/History.txt +324 -0
  59. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/MIT-LICENSE.txt +19 -0
  60. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/README.rdoc +85 -0
  61. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/Rakefile +151 -0
  62. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/install.rb +1 -0
  63. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/configuration.rb +98 -0
  64. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/area.rb +31 -0
  65. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/element.rb +33 -0
  66. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/field.rb +403 -0
  67. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/form.rb +103 -0
  68. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/label.rb +31 -0
  69. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/link.rb +92 -0
  70. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/elements/select_option.rb +35 -0
  71. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/area_locator.rb +38 -0
  72. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/button_locator.rb +54 -0
  73. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/field_by_id_locator.rb +37 -0
  74. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/field_labeled_locator.rb +56 -0
  75. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/field_locator.rb +25 -0
  76. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/field_named_locator.rb +41 -0
  77. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/form_locator.rb +19 -0
  78. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/label_locator.rb +34 -0
  79. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/link_locator.rb +66 -0
  80. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/locator.rb +20 -0
  81. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators/select_option_locator.rb +59 -0
  82. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/locators.rb +20 -0
  83. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/logging.rb +21 -0
  84. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/matchers/have_content.rb +73 -0
  85. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/matchers/have_selector.rb +74 -0
  86. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/matchers/have_tag.rb +21 -0
  87. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/matchers/have_xpath.rb +147 -0
  88. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/matchers.rb +4 -0
  89. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/methods.rb +61 -0
  90. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/mime.rb +29 -0
  91. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/save_and_open_page.rb +50 -0
  92. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/scope.rb +350 -0
  93. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/session.rb +281 -0
  94. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/xml/hpricot.rb +19 -0
  95. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/xml/nokogiri.rb +76 -0
  96. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/xml/rexml.rb +24 -0
  97. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core/xml.rb +115 -0
  98. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core.rb +14 -0
  99. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core_extensions/blank.rb +58 -0
  100. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core_extensions/deprecate.rb +8 -0
  101. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core_extensions/detect_mapped.rb +12 -0
  102. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core_extensions/meta_class.rb +6 -0
  103. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core_extensions/nil_to_param.rb +5 -0
  104. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/core_extensions/tcp_socket.rb +27 -0
  105. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/mechanize.rb +74 -0
  106. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/merb.rb +9 -0
  107. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/merb_session.rb +65 -0
  108. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/rack.rb +24 -0
  109. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/rails.rb +105 -0
  110. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/rspec-rails.rb +13 -0
  111. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/application_server.rb +71 -0
  112. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/button.js +12 -0
  113. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/label.js +16 -0
  114. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/webrat.js +5 -0
  115. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/webratlink.js +9 -0
  116. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js +15 -0
  117. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js +5 -0
  118. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/matchers/have_content.rb +66 -0
  119. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/matchers/have_selector.rb +49 -0
  120. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/matchers/have_tag.rb +72 -0
  121. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/matchers/have_xpath.rb +45 -0
  122. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/matchers.rb +4 -0
  123. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/merb_application_server.rb +48 -0
  124. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/rails_application_server.rb +42 -0
  125. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/selenium_extensions.js +6 -0
  126. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/selenium_rc_server.rb +80 -0
  127. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/selenium_session.rb +241 -0
  128. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/sinatra_application_server.rb +35 -0
  129. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium.rb +80 -0
  130. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/sinatra.rb +44 -0
  131. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat.rb +34 -0
  132. data/examples/self_test/rails/vendor/gems/webrat-0.4.4/vendor/selenium-server.jar +0 -0
  133. data/examples/self_test/simple/features/call_foo.feature +4 -0
  134. data/examples/self_test/simple/features/call_foo_and_bar_together.feature +5 -0
  135. data/examples/self_test/simple/features/call_foo_from_background_then_bar.feature +7 -0
  136. data/examples/self_test/simple/features/call_foo_from_background_then_bar_then_baz.feature +10 -0
  137. data/examples/self_test/simple/features/call_foo_then_bar.feature +7 -0
  138. data/examples/self_test/simple/features/call_foo_then_bar_from_scenario_outline_examples.feature +9 -0
  139. data/examples/self_test/simple/features/fail.feature +10 -0
  140. data/examples/self_test/simple/features/step_definitions/main_steps.rb +15 -0
  141. data/examples/self_test/simple/lib/bar.rb +5 -0
  142. data/examples/self_test/simple/lib/baz.rb +5 -0
  143. data/examples/self_test/simple/lib/foo.rb +9 -0
  144. data/features/call_foo.feature +0 -0
  145. data/features/coverage_of.feature +44 -0
  146. data/features/fail.feature +54 -0
  147. data/features/lazy_run.feature +79 -0
  148. data/features/lazy_run_per_scenario.feature +113 -0
  149. data/features/lazy_run_per_scenario_outline_example.feature +31 -0
  150. data/features/lazy_run_triggered_by_rails_view_change.feature +42 -0
  151. data/features/run.feature +25 -0
  152. data/features/show_recordings.feature +28 -0
  153. data/features/step_definitions/main_steps.rb +36 -0
  154. data/features/support/env.rb +48 -0
  155. data/lib/cucover/cli.rb +26 -0
  156. data/lib/cucover/cli_commands/coverage_of.rb +36 -0
  157. data/lib/cucover/cli_commands/cucumber.rb +25 -0
  158. data/lib/cucover/cli_commands/show_recordings.rb +29 -0
  159. data/lib/cucover/controller.rb +28 -0
  160. data/lib/cucover/cucumber_hooks.rb +29 -0
  161. data/lib/cucover/logging_config.rb +16 -0
  162. data/lib/cucover/monkey.rb +14 -0
  163. data/lib/cucover/rails.rb +20 -0
  164. data/lib/cucover/recorder.rb +37 -0
  165. data/lib/cucover/recording/covered_file.rb +53 -0
  166. data/lib/cucover/recording.rb +64 -0
  167. data/lib/cucover/store.rb +70 -0
  168. data/lib/cucover.rb +35 -212
  169. data/lib/dependencies.rb +10 -0
  170. data/spec/cucover/cli_spec.rb +31 -0
  171. data/spec/cucover/controller_spec.rb +16 -0
  172. data/spec/cucover/recording/covered_file_spec.rb +20 -0
  173. data/spec/cucover/store_spec.rb +28 -0
  174. data/spec/spec_helper.rb +7 -0
  175. data/tmp/.gitignore +0 -0
  176. metadata +304 -21
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
+ require 'commands/about'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/console'
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/cucumber/bin/cucumber")
4
+ rescue LoadError => e
5
+ raise unless e.to_s =~ /cucumber/
6
+ require "rubygems"
7
+ load File.join(Gem.bindir, "cucumber")
8
+ end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/dbconsole'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/destroy'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/profiler'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/request'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/inspector'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/reaper'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/spawner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/runner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/server'
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: webrat
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.4
5
+ platform: ruby
6
+ authors:
7
+ - Bryan Helmkamp
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-04-06 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: nokogiri
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.2.0
24
+ version:
25
+ description: Webrat. Ruby Acceptance Testing for Web applications
26
+ email: bryan@brynary.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - README.rdoc
33
+ - MIT-LICENSE.txt
34
+ files:
35
+ - History.txt
36
+ - install.rb
37
+ - MIT-LICENSE.txt
38
+ - README.rdoc
39
+ - Rakefile
40
+ - lib/webrat
41
+ - lib/webrat/core
42
+ - lib/webrat/core/configuration.rb
43
+ - lib/webrat/core/elements
44
+ - lib/webrat/core/elements/area.rb
45
+ - lib/webrat/core/elements/element.rb
46
+ - lib/webrat/core/elements/field.rb
47
+ - lib/webrat/core/elements/form.rb
48
+ - lib/webrat/core/elements/label.rb
49
+ - lib/webrat/core/elements/link.rb
50
+ - lib/webrat/core/elements/select_option.rb
51
+ - lib/webrat/core/locators
52
+ - lib/webrat/core/locators/area_locator.rb
53
+ - lib/webrat/core/locators/button_locator.rb
54
+ - lib/webrat/core/locators/field_by_id_locator.rb
55
+ - lib/webrat/core/locators/field_labeled_locator.rb
56
+ - lib/webrat/core/locators/field_locator.rb
57
+ - lib/webrat/core/locators/field_named_locator.rb
58
+ - lib/webrat/core/locators/form_locator.rb
59
+ - lib/webrat/core/locators/label_locator.rb
60
+ - lib/webrat/core/locators/link_locator.rb
61
+ - lib/webrat/core/locators/locator.rb
62
+ - lib/webrat/core/locators/select_option_locator.rb
63
+ - lib/webrat/core/locators.rb
64
+ - lib/webrat/core/logging.rb
65
+ - lib/webrat/core/matchers
66
+ - lib/webrat/core/matchers/have_content.rb
67
+ - lib/webrat/core/matchers/have_selector.rb
68
+ - lib/webrat/core/matchers/have_tag.rb
69
+ - lib/webrat/core/matchers/have_xpath.rb
70
+ - lib/webrat/core/matchers.rb
71
+ - lib/webrat/core/methods.rb
72
+ - lib/webrat/core/mime.rb
73
+ - lib/webrat/core/save_and_open_page.rb
74
+ - lib/webrat/core/scope.rb
75
+ - lib/webrat/core/session.rb
76
+ - lib/webrat/core/xml
77
+ - lib/webrat/core/xml/hpricot.rb
78
+ - lib/webrat/core/xml/nokogiri.rb
79
+ - lib/webrat/core/xml/rexml.rb
80
+ - lib/webrat/core/xml.rb
81
+ - lib/webrat/core.rb
82
+ - lib/webrat/core_extensions
83
+ - lib/webrat/core_extensions/blank.rb
84
+ - lib/webrat/core_extensions/deprecate.rb
85
+ - lib/webrat/core_extensions/detect_mapped.rb
86
+ - lib/webrat/core_extensions/meta_class.rb
87
+ - lib/webrat/core_extensions/nil_to_param.rb
88
+ - lib/webrat/core_extensions/tcp_socket.rb
89
+ - lib/webrat/mechanize.rb
90
+ - lib/webrat/merb.rb
91
+ - lib/webrat/merb_session.rb
92
+ - lib/webrat/rack.rb
93
+ - lib/webrat/rails.rb
94
+ - lib/webrat/rspec-rails.rb
95
+ - lib/webrat/selenium
96
+ - lib/webrat/selenium/application_server.rb
97
+ - lib/webrat/selenium/location_strategy_javascript
98
+ - lib/webrat/selenium/location_strategy_javascript/button.js
99
+ - lib/webrat/selenium/location_strategy_javascript/label.js
100
+ - lib/webrat/selenium/location_strategy_javascript/webrat.js
101
+ - lib/webrat/selenium/location_strategy_javascript/webratlink.js
102
+ - lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js
103
+ - lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js
104
+ - lib/webrat/selenium/matchers
105
+ - lib/webrat/selenium/matchers/have_content.rb
106
+ - lib/webrat/selenium/matchers/have_selector.rb
107
+ - lib/webrat/selenium/matchers/have_tag.rb
108
+ - lib/webrat/selenium/matchers/have_xpath.rb
109
+ - lib/webrat/selenium/matchers.rb
110
+ - lib/webrat/selenium/merb_application_server.rb
111
+ - lib/webrat/selenium/rails_application_server.rb
112
+ - lib/webrat/selenium/selenium_extensions.js
113
+ - lib/webrat/selenium/selenium_rc_server.rb
114
+ - lib/webrat/selenium/selenium_session.rb
115
+ - lib/webrat/selenium/sinatra_application_server.rb
116
+ - lib/webrat/selenium.rb
117
+ - lib/webrat/sinatra.rb
118
+ - lib/webrat.rb
119
+ - vendor/selenium-server.jar
120
+ has_rdoc: true
121
+ homepage: http://github.com/brynary/webrat
122
+ post_install_message:
123
+ rdoc_options: []
124
+
125
+ require_paths:
126
+ - bin
127
+ - lib
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: "0"
133
+ version:
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: "0"
139
+ version:
140
+ requirements: []
141
+
142
+ rubyforge_project: webrat
143
+ rubygems_version: 1.3.1
144
+ signing_key:
145
+ specification_version: 2
146
+ summary: Webrat. Ruby Acceptance Testing for Web applications
147
+ test_files: []
148
+
@@ -0,0 +1,324 @@
1
+ == 0.4.4 / 2009-04-06
2
+
3
+ * Major enhancements
4
+
5
+ * Make selenium process management code more robust and informative
6
+
7
+ * Minor enhancements
8
+
9
+ * Add support for Rails javascript post links (Mark Menard)
10
+ * Upgrade selenium-client dependency to 1.2.14, and update for new waiting
11
+ API (Balint Erdi)
12
+ * Change default app environment from "selenium" to "test"
13
+
14
+ * Bug fixes
15
+
16
+ * Don't create a new instance of WWW::Mechanize for each request
17
+ (Mark Menard)
18
+
19
+ == 0.4.3 / 2009-03-17
20
+
21
+ * Minor enhancements
22
+
23
+ * Support Rails 2.3. Use Rack::Utils to parse params (Matthew Ford)
24
+ * Support for "modular" Sinatra app style (Simon Rozet)
25
+ * Initial Merb and Sinatra compatibility for Selenium mode (Corey Donohoe)
26
+ * When faced with a label with no for attribute, that contains a hidden field
27
+ and another field, as can be the case in Rails 2.3's checkbox view,
28
+ webrat now locates the non-hidden field. (Luke Melia)
29
+ * Add application_framework config for Selenium mode to determine how to
30
+ start and stop the app server (Corey Donohoe)
31
+
32
+ * Bug fixes
33
+
34
+ * Fix following of absolute redirect URL in Sinatra (Simon Rozet)
35
+
36
+ == 0.4.2 / 2009-02-24
37
+
38
+ * Major enhancements
39
+
40
+ * Significant improvements to have_selector. It now supports specifying
41
+ attributes in a hash and :count and :content options. See
42
+ have_selector_spec.rb for more.
43
+ * Add the same functionality mentioned above to have_xpath
44
+
45
+ * Minor enhancements
46
+
47
+ * Squeeze extra whitespace out of failures messages from contain
48
+ matcher
49
+ * Detect infinite redirects and raise a Webrat::InfiniteRedirectError
50
+ (Daniel Lucraft)
51
+
52
+ * Bug fixes
53
+
54
+ * Properly quote single and double quotes strings in XPath
55
+ * Fix warning caused by Nokogiri deprecating CSS::Parser.parse
56
+ (Aaron Patterson)
57
+ * Accept do/end blocks in matchers. [#157] (Peter Jaros)
58
+ * Quote --chdir option to mongrel_rails to support RAILS_ROOTs with spaces
59
+ (T.J. VanSlyke)
60
+
61
+ == 0.4.1 / 2009-01-31
62
+
63
+ * Minor enhancements
64
+
65
+ * Support Sinatra 0.9 (Harry Vangberg)
66
+ * Update query param parsing to work with latest Edge Rails
67
+ * Added #redirected_to method to easily check where an external redirect was
68
+ redirected to (Adam Greene)
69
+ * Recognize input tags with type button (Lena Herrmann)
70
+ * Add uncheck method to Selenium mode (Lee Bankewitz)
71
+
72
+ * Bug fixes
73
+
74
+ * Make requests to a Rails app using a full URL instead of a relative path. This change
75
+ is helpful for Rails apps that use subdomains. (John Hwang and Zach Dennis)
76
+ * Follow redirects that are on the same domain but a different subdomain
77
+ (Adam Greene)
78
+ * rescue from Webrat::TimeoutError in selenium matchers which allows NegativeMatchers
79
+ to behave correctly (Noah Davis)
80
+ * Switch to using selenium.click instead of .check when checking a checkbox
81
+ (Noah Davis)
82
+ * Create tmp/pids directory if directory does not exist. (Amos King and Mike Gaffney)
83
+ * Setup deprecated writers for the selenium_environment= and selenium_port= config
84
+ * Ensure the previous pages params aren't passed through redirect (Daniel Lucraft and
85
+ Bryan Helmkamp)
86
+ * Labels should only search for fields within the current scope (Kyle Hargraves)
87
+
88
+ == 0.4.0 / 2009-01-18
89
+
90
+ * _IMPORTANT_ Breaking change:
91
+
92
+ * Removed init.rb auto-require of webrat/rails
93
+ * Removed auto-require of webrat/rails when requiring webrat when RAILS_ENV is
94
+ defined
95
+
96
+ In your env.rb or test_helper.rb file, ensure you have something like:
97
+
98
+ require "webrat"
99
+
100
+ Webrat.configure do |config|
101
+ config.mode = :rails
102
+ end
103
+
104
+ * Major enhancements
105
+
106
+ * Major improvements to Webrat::Selenium (Many contributors listed here)
107
+ * Add assert_* methods for using Webrat's matchers w/o RSpec (Mike Gaffney, Amos King)
108
+ * Added Webrat.configure method for Webrat configuration [#33] (Mike Gaffney)
109
+ * Added select_time, select_date, and select_datetime to API. [#36] (Ben Mabey)
110
+ * Use Hpricot and REXML when not parsing with Nokogiri (on JRuby, for example)
111
+
112
+ * Minor enhancements
113
+
114
+ * Added Selenium grid configuration and support. (Amos King && Cornel Borcean)
115
+ * Support passing an ActiveRecord model to #within when in Rails mode [#68] (Luke Melia)
116
+ * Make assert_* matchers in rails mode increment the assertions count [#123] (Amos King)
117
+ * Added assert_* matchers to selenium matchers [#110] (Amos King)
118
+ * Added assert_contain, assert_not_contain [#86] (Mike Gaffney, Amos King)
119
+ * Add configuration options for the Selenium environment and port (Kieran Pilkington)
120
+ * Maximize the browser window after initializing Selenium (Luke Melia)
121
+ * Better inspect output for Webrat elements
122
+ * Sets the Webrat mode with Configuration#mode= in the config block [#85] (Mike Gaffney)
123
+ * Detect if the document is XML or HTML using the Content-Type when in Rails mode
124
+ * Expose #selenium method for direct access to Selenium client
125
+ * Check nokogiri gem version before requiring nokogiri
126
+ * Include the Selenium server jar file in the gem (Bryan Helmkamp, Ben Schwarz)
127
+ * Added key_down, key_up and fire_event to Selenium session (Fernando Garcia)
128
+ * Fix outputing README during Rails plugin install (Fernando Garcia)
129
+ * Strip newlines when matching label text (Miha Filej)
130
+ * Add simple support for accessing Webrat's matchers from RSpec by requiring
131
+ "webrat/rspec-rails" (David Chelimsky)
132
+ * Support save_and_open_page in Windows and Cygwin (Mike Gaffney)
133
+ * Added RadioField#checked? to indicated whether or not a radio button is checked
134
+ (Luke Melia)
135
+ * Add spec:jruby rake task for running Webrat's spec suite with JRuby
136
+ * Added field_by_xpath to locate a Webrat::Field using arbitrary XPath expressions
137
+ * Helpful error message for missing option values [#40] (Ben Mabey)
138
+ * Add set_hidden_field method (Noah Davis, Bryan Helmkamp)
139
+ * Add submit_form method for submitting a form by ID (Noah Davis, Bryan Helmkamp)
140
+ * Switch to using Nokogiri.parse for simple XML/XHTML autodetection [#66]
141
+ * Removed Webrat.root method, which seemed to be unused
142
+ * Added automatic starting and stopping of the Selenium server and a Mongrel Rails
143
+ app server when using webrat/selenium
144
+ * Switch to using selenium-client gem and vendor selenium-server.jar (Luke Melia)
145
+ * Added gemspec so the gem builds on GitHub now
146
+ * Deprecate old style methods (fills_in is deprecated in favor of fill_in, etc.)
147
+ * Improvements to the README and RDoc (Bryan Helmkamp, Mike Gaffney)
148
+ * Allow clicking links by id and id regexp (Mike Gaffney)
149
+ * Raise Webrat::DisabledFieldError when attempting to manipulate a disabled field
150
+ * Raise Webrat::NotFoundErrors when an element is not found
151
+ * Raise Webrat::PageLoadError when a failure occurs so that application exceptions
152
+ can be more accurately tested (Ryan Briones)
153
+ * Helpful error message for missing option in select box. [#40] (Ben Mabey)
154
+ * Extracted save_and_open page to make it usable in Selenium mode (Luke Melia)
155
+ * Added save_and_open_screengrab for Selenium mode (Luke Melia)
156
+
157
+ * Bug fixes
158
+
159
+ * field_labeled should disregard labels without matching fields (Kyle Hargraves)
160
+ * Fixed bug where Scope was creating a new DOM rather than re-using the existing DOM.
161
+ [#105] (Zach Dennis)
162
+ * Support Rails > v2.2 by using ActionController::RequestParser for param parsing [#107]
163
+ (Marcello Nuccio)
164
+ * Raise a Webrat::NotFoundError if the scope passed to #within doesn't exist [#90]
165
+ * Match against link _text_ which decodes character references.
166
+ Useful for multibyte languages like Japanese (moronatural@gmail.com)
167
+ * Fix params hash generation for Mechanize when Merb is not defined [#62]
168
+ * Expose some Webrat methods that were missing from the Webrat::Methods module
169
+ (Low Chin Chau)
170
+ * Allow mechanize session to pass through basic auth (Ryan Briones)
171
+ * Improvements to the Mechanize support (Jeremy Burks)
172
+ * Fix following fully qualified local links (Lawrence Pit)
173
+ * Fixed bug where Webrat would lose complex parameters (like foo[bar[baz]][])
174
+ in Merb due to not correctly merging Mashes. (Drew Colthorp)
175
+ * Extend Rails' ActionController::IntegrationTest instead of
176
+ ActionController::Integration::Session (Fixes using Webrat's #select method and
177
+ avoids usage of method_missing)
178
+ * Ensure that Webrat::MechanizeSession.request_page always uses an absolute
179
+ URL. (Graham Ashton)
180
+ * Strip anchor tags from URIs before passing to Rails integration session
181
+ (Noah Davis)
182
+ * Treat text and regexp when matching Selenium buttons (Ross Kaffenberger)
183
+ * Allow SeleniumSession's click_button to be called without an argument without
184
+ blowing up (Luke Melia)
185
+
186
+ == 0.3.4 / 2008-12-29
187
+
188
+ * 1 Minor enhancement
189
+
190
+ * Fix compatibility with Nokogiri 1.1.0 on JRuby
191
+
192
+ * 1 Bug fix
193
+
194
+ * Correct version for Nokogiri dependency in gem
195
+
196
+ == 0.3.3 / 2008-12-28
197
+
198
+ * 1 Minor enhancement
199
+
200
+ * Fix compatibility with Nokogiri 1.1.0 on MRI
201
+
202
+ == 0.3.2 / 2008-11-08
203
+
204
+ * 1 Minor enhancement
205
+
206
+ * Fixes behavior or have_tag when a block is passed. It passes the matched node(s)
207
+ to the block for further specs again. (Carl Lerche)
208
+
209
+ == 0.3.1 / 2008-11-07
210
+
211
+ * 1 Minor enhancement
212
+
213
+ * Use @_webrat_session instance variable instead of @session for Merb integration
214
+ to avoid collisions
215
+
216
+ == 0.3.0 / 2008-11-07
217
+
218
+ * 4 Major enhancements
219
+
220
+ * Added Merb support (Gwyn Morfey, Jeremy Burks, Rob Kaufman, Yehuda Katz)
221
+ * Added experimental Selenium support (Luke Melia)
222
+ * Add have_selector, have_xpath, have_tag and contain matchers from Merb
223
+ * Switch from Hpricot to Nokogiri for XML parsing (thanks, Aaron Patterson)
224
+
225
+ * 37 Minor enhancements
226
+
227
+ * Added #within for manipulating the current page within a selector scope
228
+ * Add support for file fields via #attaches_file method (Rails only at the moment)
229
+ (Kyle Hargraves)
230
+ * Add support for simulating SSL requests (Luke Melia)
231
+ * Added #basic_auth(user, pass) to support HTTP Basic Auth (Aslak Hellesøy)
232
+ * Added support for Sinatra and Rack (Aslak Hellesøy)
233
+ * Rename visits to visit, fills_in to fill_in, etc.
234
+ * Add #field_labeled for looking up form fields by label (David Chelimsky)
235
+ * Add #field_named and #field_with_id locators
236
+ * Don't depend on hoe anymore
237
+ * Return responses after sending requests
238
+ * Allow clicking links and buttons by a regular expression in Selenium (Luke Melia)
239
+ * Allow clicking links by a regular expression
240
+ * Add #http_accept for including MIME type HTTP "Accept" headers (Ryan Briones)
241
+ * Add #header to support inclusion of custom HTTP headers (Ryan Briones)
242
+ * Consider response codes 200-499 as successful enough to not raise a Webrat error
243
+ (David Leal)
244
+ * Add support for clicking areas of an image map (Alex Lang)
245
+ * Support relative links, including href="?foo=bar" (Kyle Hargraves)
246
+ * Separated Rails-specific code from the Webrat core to make it easier to use
247
+ Webrat with other environments
248
+ * Alias visits as visit, clicks_link as click_link, etc. for better readability
249
+ * Raise error when trying to interact with a disabled form element (Luke Melia)
250
+ * Don't send disabled form elements to the server (Nicholas A. Evans)
251
+ * Display response body when the page load is not successful (David Leal)
252
+ * CGI escape form field values (Miha Filej)
253
+ * Add support for redirect_to :back by sending HTTP_REFERER headers
254
+ (Hendrik Volkmer)
255
+ * Expose current DOM (as an Hpricot object) as #current_dom
256
+ * Add support for disabling JavaScript when clicking a link to enable testing of
257
+ both JS and non-JS implementations (Luke Melia and Bryan Helmkamp)
258
+ * Support &nbsp's as spaces in matching link text (Luke Melia)
259
+ * Support button elements (Nick Sieger)
260
+ * Support matching select options by regexp (Kyle Hargraves)
261
+ * save_and_open_page rewrites css and image references to provide a friendlier
262
+ debugging experience (Luke Melia)
263
+ * Added support for matching alt attributes in fields (primarly for clicks_button)
264
+ (Aaron Quint)
265
+ * Support '&' in submitted values (Kyle Hargraves)
266
+ * Support clicking links by title (Dan Barry)
267
+ * Added missing spec for clicking image buttons (Tim Harper)
268
+ * Switched tests to specs, and from Mocha to RSpec's mocking library
269
+ * Add support to click_button for IDs (Gwyn Morfey)
270
+ * Miscellaneous core refactorings (Jan Suchal)
271
+
272
+ * 8 Bug fixes
273
+
274
+ * Fix initialization of WWW::Mechanize (Derek Kastner)
275
+ * Don't open blank pages in the browser (Kyle Hargraves)
276
+ * Support radio buttons with multiple labels (Dan Barry)
277
+ * Fix load order bug on some platforms (Ismael Celis)
278
+ * Fix bug with empty select list option (Kyle Hargraves)
279
+ * Fix regression of not sending default values in password fields
280
+ * Don't explode if encountering inputs with no type attribute (assume text)
281
+ * Fix bug where choosing a radio button in a series with a default submitted the
282
+ incorrect field value (Luke Melia)
283
+
284
+ == 0.2.0 / 2008-04-04
285
+
286
+ * 4 Major enhancements
287
+
288
+ * Add save_and_open_page to aid in debugging
289
+ * Add radio button support via #chooses method
290
+ * Add basic support for Rails-generated JavaScript link tags
291
+ * Add support for checkboxes (Patches from Kyle Hargraves and Jarkko Laine)
292
+ * Add support for textarea fields (Sacha Schlegel)
293
+
294
+ * 8 Minor enhancements
295
+
296
+ * Added reloads method to reload the page (Kamal Fariz Mahyuddi)
297
+ * Prevent making a request if clicking on local anchor link (Kamal Fariz Mahyuddi)
298
+ * Added clicks_link_within(selector, link_text), allowing restricting link search
299
+ to within a given css selector (Luke Melia)
300
+ * Allow specifying the input name/label when doing a select (David Chelimsky)
301
+ * Raise a specific exception if the developer tries to manipulate form elements
302
+ before loading a page (James Deville)
303
+ * Add support for alternate POST, PUT and DELETE link clicking (Kyle Hargraves)
304
+ * Change clicks_link to find the shortest matching link (Luke Melia)
305
+ * Improve matching for labels in potentially ambiguous cases
306
+
307
+ * 7 Bug fixes
308
+
309
+ * Fix incorrect serializing of collection inputs, i.e. name contains []
310
+ (Kamal Fariz Mahyuddi)
311
+ * Serialize empty text field values just like browsers (Kamal Fariz Mahyuddi)
312
+ * Quick fix to avoid @dom not initialized warnings (Kamal Fariz Mahyuddi)
313
+ * Docfix: bad reference to #select method in README (Luke Melia)
314
+ * Ensure Rails-style checkboxes work properly (checkboxes followed by a hidden
315
+ input with the same name)
316
+ * Fix Edge Rails (a.k.a. 2.0 RC) compatibility (David Chelimsky)
317
+ * Support param hashes nested more than one level (David Chelimsky)
318
+
319
+ == 0.1.0 / 2007-11-28
320
+
321
+ * 1 major enhancement
322
+
323
+ * Birthday!
324
+
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2007 Bryan Helmkamp, Seth Fitzsimmons
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,85 @@
1
+ = Webrat - Ruby Acceptance Testing for Web applications
2
+
3
+ - http://gitrdoc.com/brynary/webrat
4
+ - http://groups.google.com/group/webrat
5
+ - http://webrat.lighthouseapp.com/
6
+ - http://github.com/brynary/webrat
7
+ - #webrat on Freenode
8
+
9
+ == Description
10
+
11
+ Webrat lets you quickly write expressive and robust acceptance tests for a Ruby
12
+ web application.
13
+
14
+ == Features
15
+
16
+ * Browser Simulator for expressive, high level acceptance testing without the
17
+ performance hit and browser dependency of Selenium or Watir (See Webrat::Session)
18
+ * Use the same API for Browser Simulator and real Selenium tests using
19
+ Webrat::Selenium when necessary (eg. for testing AJAX interactions)
20
+ * Supports multiple Ruby web frameworks: Rails, Merb and Sinatra
21
+ * Supports popular test frameworks: RSpec, Cucumber, Test::Unit and Shoulda
22
+ * Webrat::Matchers API for verifying rendered HTML using CSS, XPath, etc.
23
+
24
+ == Example
25
+
26
+ class SignupTest < ActionController::IntegrationTest
27
+
28
+ def test_trial_account_sign_up
29
+ visit home_path
30
+ click_link "Sign up"
31
+ fill_in "Email", :with => "good@example.com"
32
+ select "Free account"
33
+ click_button "Register"
34
+ end
35
+
36
+ end
37
+
38
+ Behind the scenes, Webrat will ensure:
39
+
40
+ * If a link, form field or button is missing, the test will fail.
41
+ * If a URL is invalid, the test will fail.
42
+ * If a page load or form submission is unsuccessful, the test will fail.
43
+
44
+ == Installing Nokogiri
45
+
46
+ Users of Debian Linux (e.g. Ubuntu) need to run:
47
+
48
+ sudo apt-get install libxslt1-dev libxml2-dev.
49
+
50
+ Otherwise the Nokogiri gem, which Webrat depends on, won't install properly.
51
+
52
+ == Install for Rails
53
+
54
+ To install the latest release as a gem:
55
+
56
+ sudo gem install webrat
57
+
58
+ To install the latest code as a plugin: (_Note:_ This may be less stable than using a released version)
59
+
60
+ script/plugin install git://github.com/brynary/webrat.git
61
+
62
+ In your test_helper.rb or env.rb (for Cucumber) add:
63
+
64
+ require "webrat"
65
+
66
+ Webrat.configure do |config|
67
+ config.mode = :rails
68
+ end
69
+
70
+ == Install with Merb
71
+
72
+ Merb 1.0 has built-in, seamless Webrat support. Just start using
73
+ methods from Webrat::Session in your specs.
74
+
75
+ == Authors
76
+
77
+ - Maintained by {Bryan Helmkamp}[mailto:bryan@brynary.com]
78
+ - Original code written by {Seth Fitzsimmons}[mailto:seth@mojodna.net]
79
+ - Initial development was sponsored by EastMedia[http://www.eastmedia.com]
80
+ - Many other contributors. See attributions in History.txt
81
+
82
+ == License
83
+
84
+ Copyright (c) 2007-2008 Bryan Helmkamp, Seth Fitzsimmons.
85
+ See MIT-LICENSE.txt in this directory.