webrat 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +4 -0
- data/.gitignore +15 -0
- data/History.txt +44 -8
- data/Rakefile +80 -66
- data/VERSION +1 -0
- data/lib/webrat.rb +7 -12
- data/lib/webrat/core/configuration.rb +7 -3
- data/lib/webrat/core/elements/area.rb +7 -7
- data/lib/webrat/core/elements/element.rb +11 -11
- data/lib/webrat/core/elements/field.rb +63 -55
- data/lib/webrat/core/elements/form.rb +17 -17
- data/lib/webrat/core/elements/label.rb +6 -6
- data/lib/webrat/core/elements/link.rb +13 -12
- data/lib/webrat/core/elements/select_option.rb +9 -9
- data/lib/webrat/core/locators.rb +2 -2
- data/lib/webrat/core/locators/area_locator.rb +10 -10
- data/lib/webrat/core/locators/button_locator.rb +13 -13
- data/lib/webrat/core/locators/field_by_id_locator.rb +8 -8
- data/lib/webrat/core/locators/field_labeled_locator.rb +11 -11
- data/lib/webrat/core/locators/field_locator.rb +7 -7
- data/lib/webrat/core/locators/field_named_locator.rb +10 -10
- data/lib/webrat/core/locators/form_locator.rb +6 -6
- data/lib/webrat/core/locators/label_locator.rb +9 -9
- data/lib/webrat/core/locators/link_locator.rb +21 -13
- data/lib/webrat/core/locators/locator.rb +5 -5
- data/lib/webrat/core/locators/select_option_locator.rb +11 -11
- data/lib/webrat/core/logging.rb +7 -4
- data/lib/webrat/core/matchers/have_content.rb +12 -12
- data/lib/webrat/core/matchers/have_selector.rb +9 -9
- data/lib/webrat/core/matchers/have_tag.rb +4 -4
- data/lib/webrat/core/matchers/have_xpath.rb +26 -26
- data/lib/webrat/core/methods.rb +13 -11
- data/lib/webrat/core/mime.rb +3 -3
- data/lib/webrat/core/save_and_open_page.rb +14 -16
- data/lib/webrat/core/scope.rb +53 -53
- data/lib/webrat/core/session.rb +23 -14
- data/lib/webrat/core/xml.rb +16 -16
- data/lib/webrat/core/xml/hpricot.rb +3 -3
- data/lib/webrat/core/xml/nokogiri.rb +11 -11
- data/lib/webrat/core/xml/rexml.rb +3 -3
- data/lib/webrat/core_extensions/blank.rb +1 -1
- data/lib/webrat/core_extensions/deprecate.rb +1 -1
- data/lib/webrat/core_extensions/detect_mapped.rb +4 -4
- data/lib/webrat/core_extensions/meta_class.rb +1 -1
- data/lib/webrat/core_extensions/tcp_socket.rb +8 -8
- data/lib/webrat/mechanize.rb +9 -9
- data/lib/webrat/merb.rb +1 -1
- data/lib/webrat/merb_multipart_support.rb +27 -0
- data/lib/webrat/merb_session.rb +39 -24
- data/lib/webrat/rack_test.rb +32 -0
- data/lib/webrat/rails.rb +2 -2
- data/lib/webrat/rspec-rails.rb +3 -6
- data/lib/webrat/selenium.rb +2 -1
- data/lib/webrat/selenium/application_server_factory.rb +40 -0
- data/lib/webrat/selenium/application_servers.rb +5 -0
- data/lib/webrat/selenium/application_servers/base.rb +46 -0
- data/lib/webrat/selenium/application_servers/external.rb +26 -0
- data/lib/webrat/selenium/application_servers/merb.rb +50 -0
- data/lib/webrat/selenium/application_servers/rails.rb +44 -0
- data/lib/webrat/selenium/application_servers/sinatra.rb +37 -0
- data/lib/webrat/selenium/location_strategy_javascript/button.js +14 -7
- data/lib/webrat/selenium/location_strategy_javascript/webratlink.js +4 -1
- data/lib/webrat/selenium/matchers.rb +1 -1
- data/lib/webrat/selenium/matchers/have_content.rb +4 -4
- data/lib/webrat/selenium/matchers/have_selector.rb +4 -4
- data/lib/webrat/selenium/matchers/have_tag.rb +16 -16
- data/lib/webrat/selenium/matchers/have_xpath.rb +4 -4
- data/lib/webrat/selenium/selenium_rc_server.rb +25 -19
- data/lib/webrat/selenium/selenium_session.rb +24 -17
- data/lib/webrat/selenium/silence_stream.rb +18 -0
- data/spec/fakes/test_session.rb +34 -0
- data/spec/integration/merb/.gitignore +21 -0
- data/spec/integration/merb/Rakefile +35 -0
- data/spec/integration/merb/app/controllers/application.rb +2 -0
- data/spec/integration/merb/app/controllers/exceptions.rb +13 -0
- data/spec/integration/merb/app/controllers/testing.rb +27 -0
- data/spec/integration/merb/app/views/exceptions/not_acceptable.html.erb +63 -0
- data/spec/integration/merb/app/views/exceptions/not_found.html.erb +47 -0
- data/spec/integration/merb/app/views/layout/application.html.erb +12 -0
- data/spec/integration/merb/app/views/testing/show_form.html.erb +27 -0
- data/spec/integration/merb/app/views/testing/upload.html.erb +9 -0
- data/spec/integration/merb/config/environments/development.rb +15 -0
- data/spec/integration/merb/config/environments/rake.rb +11 -0
- data/spec/integration/merb/config/environments/test.rb +14 -0
- data/spec/integration/merb/config/init.rb +25 -0
- data/spec/integration/merb/config/rack.rb +11 -0
- data/spec/integration/merb/config/router.rb +34 -0
- data/spec/integration/merb/spec/spec.opts +1 -0
- data/spec/integration/merb/spec/spec_helper.rb +24 -0
- data/spec/integration/merb/spec/webrat_spec.rb +39 -0
- data/spec/integration/merb/tasks/merb.thor/app_script.rb +31 -0
- data/spec/integration/merb/tasks/merb.thor/common.rb +64 -0
- data/spec/integration/merb/tasks/merb.thor/gem_ext.rb +124 -0
- data/spec/integration/merb/tasks/merb.thor/main.thor +150 -0
- data/spec/integration/merb/tasks/merb.thor/ops.rb +93 -0
- data/spec/integration/merb/tasks/merb.thor/utils.rb +40 -0
- data/spec/integration/rack/Rakefile +5 -0
- data/spec/integration/rack/rack_app.rb +16 -0
- data/spec/integration/rack/test/test_helper.rb +20 -0
- data/spec/integration/rack/test/webrat_rack_test.rb +67 -0
- data/spec/integration/rails/.gitignore +3 -0
- data/spec/integration/rails/Rakefile +30 -0
- data/spec/integration/rails/app/controllers/application.rb +15 -0
- data/spec/integration/rails/app/controllers/buttons_controller.rb +7 -0
- data/spec/integration/rails/app/controllers/fields_controller.rb +4 -0
- data/spec/integration/rails/app/controllers/links_controller.rb +7 -0
- data/spec/integration/rails/app/controllers/webrat_controller.rb +43 -0
- data/spec/integration/rails/app/helpers/buttons_helper.rb +2 -0
- data/spec/integration/rails/app/helpers/fields_helper.rb +2 -0
- data/spec/integration/rails/app/helpers/links_helper.rb +2 -0
- data/spec/integration/rails/app/views/buttons/show.html.erb +11 -0
- data/spec/integration/rails/app/views/fields/show.html.erb +9 -0
- data/spec/integration/rails/app/views/links/show.html.erb +5 -0
- data/spec/integration/rails/app/views/webrat/before_redirect_form.html.erb +4 -0
- data/spec/integration/rails/app/views/webrat/buttons.html.erb +11 -0
- data/spec/integration/rails/app/views/webrat/form.html.erb +28 -0
- data/spec/integration/rails/config/boot.rb +109 -0
- data/spec/integration/rails/config/environment.rb +12 -0
- data/spec/integration/rails/config/environments/development.rb +17 -0
- data/spec/integration/rails/config/environments/selenium.rb +22 -0
- data/spec/integration/rails/config/environments/test.rb +22 -0
- data/spec/integration/rails/config/initializers/inflections.rb +10 -0
- data/spec/integration/rails/config/initializers/mime_types.rb +5 -0
- data/spec/integration/rails/config/initializers/new_rails_defaults.rb +17 -0
- data/spec/integration/rails/config/locales/en.yml +5 -0
- data/spec/integration/rails/config/routes.rb +18 -0
- data/spec/integration/rails/public/404.html +30 -0
- data/spec/integration/rails/public/422.html +30 -0
- data/spec/integration/rails/public/500.html +33 -0
- data/spec/integration/rails/script/about +4 -0
- data/spec/integration/rails/script/console +3 -0
- data/spec/integration/rails/script/dbconsole +3 -0
- data/spec/integration/rails/script/destroy +3 -0
- data/spec/integration/rails/script/generate +3 -0
- data/spec/integration/rails/script/performance/benchmarker +3 -0
- data/spec/integration/rails/script/performance/profiler +3 -0
- data/spec/integration/rails/script/performance/request +3 -0
- data/spec/integration/rails/script/plugin +3 -0
- data/spec/integration/rails/script/process/inspector +3 -0
- data/spec/integration/rails/script/process/reaper +3 -0
- data/spec/integration/rails/script/process/spawner +3 -0
- data/spec/integration/rails/script/runner +3 -0
- data/spec/integration/rails/script/server +3 -0
- data/spec/integration/rails/test/integration/button_click_test.rb +80 -0
- data/spec/integration/rails/test/integration/fill_in_test.rb +24 -0
- data/spec/integration/rails/test/integration/link_click_test.rb +27 -0
- data/spec/integration/rails/test/integration/webrat_test.rb +97 -0
- data/spec/integration/rails/test/test_helper.rb +25 -0
- data/spec/integration/sinatra/Rakefile +5 -0
- data/spec/integration/sinatra/classic_app.rb +64 -0
- data/spec/integration/sinatra/modular_app.rb +16 -0
- data/spec/integration/sinatra/test/classic_app_test.rb +37 -0
- data/spec/integration/sinatra/test/modular_app_test.rb +18 -0
- data/spec/integration/sinatra/test/test_helper.rb +16 -0
- data/spec/private/core/configuration_spec.rb +116 -0
- data/spec/private/core/field_spec.rb +85 -0
- data/spec/private/core/link_spec.rb +24 -0
- data/spec/private/core/logging_spec.rb +10 -0
- data/spec/private/core/session_spec.rb +195 -0
- data/spec/private/mechanize/mechanize_session_spec.rb +81 -0
- data/spec/private/merb/attaches_file_spec.rb +93 -0
- data/spec/private/merb/merb_session_spec.rb +61 -0
- data/spec/private/nokogiri_spec.rb +77 -0
- data/spec/private/rails/attaches_file_spec.rb +81 -0
- data/spec/private/rails/rails_session_spec.rb +110 -0
- data/spec/private/selenium/application_servers/rails_spec.rb +26 -0
- data/spec/public/basic_auth_spec.rb +24 -0
- data/spec/public/check_spec.rb +191 -0
- data/spec/public/choose_spec.rb +118 -0
- data/spec/public/click_area_spec.rb +106 -0
- data/spec/public/click_button_spec.rb +496 -0
- data/spec/public/click_link_spec.rb +511 -0
- data/spec/public/fill_in_spec.rb +209 -0
- data/spec/public/locators/field_by_xpath_spec.rb +19 -0
- data/spec/public/locators/field_labeled_spec.rb +172 -0
- data/spec/public/locators/field_with_id_spec.rb +16 -0
- data/spec/public/matchers/contain_spec.rb +114 -0
- data/spec/public/matchers/have_selector_spec.rb +142 -0
- data/spec/public/matchers/have_tag_spec.rb +39 -0
- data/spec/public/matchers/have_xpath_spec.rb +136 -0
- data/spec/public/reload_spec.rb +10 -0
- data/spec/public/save_and_open_spec.rb +70 -0
- data/spec/public/select_date_spec.rb +112 -0
- data/spec/public/select_datetime_spec.rb +137 -0
- data/spec/public/select_spec.rb +249 -0
- data/spec/public/select_time_spec.rb +100 -0
- data/spec/public/selenium/application_server_factory_spec.rb +49 -0
- data/spec/public/selenium/application_servers/external_spec.rb +12 -0
- data/spec/public/selenium/selenium_session_spec.rb +37 -0
- data/spec/public/set_hidden_field_spec.rb +5 -0
- data/spec/public/submit_form_spec.rb +5 -0
- data/spec/public/visit_spec.rb +58 -0
- data/spec/public/within_spec.rb +177 -0
- data/spec/rcov.opts +1 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +50 -0
- data/vendor/selenium-server.jar +0 -0
- data/webrat.gemspec +340 -0
- metadata +248 -33
- data/lib/webrat/selenium/application_server.rb +0 -71
- data/lib/webrat/selenium/merb_application_server.rb +0 -48
- data/lib/webrat/selenium/rails_application_server.rb +0 -42
- data/lib/webrat/selenium/sinatra_application_server.rb +0 -35
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webrat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Helmkamp
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-10 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,25 +22,28 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.2.0
|
24
24
|
version:
|
25
|
-
description:
|
25
|
+
description:
|
26
26
|
email: bryan@brynary.com
|
27
27
|
executables: []
|
28
28
|
|
29
29
|
extensions: []
|
30
30
|
|
31
31
|
extra_rdoc_files:
|
32
|
-
-
|
32
|
+
- History.txt
|
33
33
|
- MIT-LICENSE.txt
|
34
|
+
- README.rdoc
|
34
35
|
files:
|
36
|
+
- .document
|
37
|
+
- .gitignore
|
35
38
|
- History.txt
|
36
|
-
- install.rb
|
37
39
|
- MIT-LICENSE.txt
|
38
40
|
- README.rdoc
|
39
41
|
- Rakefile
|
40
|
-
-
|
41
|
-
-
|
42
|
+
- VERSION
|
43
|
+
- install.rb
|
44
|
+
- lib/webrat.rb
|
45
|
+
- lib/webrat/core.rb
|
42
46
|
- lib/webrat/core/configuration.rb
|
43
|
-
- lib/webrat/core/elements
|
44
47
|
- lib/webrat/core/elements/area.rb
|
45
48
|
- lib/webrat/core/elements/element.rb
|
46
49
|
- lib/webrat/core/elements/field.rb
|
@@ -48,7 +51,7 @@ files:
|
|
48
51
|
- lib/webrat/core/elements/label.rb
|
49
52
|
- lib/webrat/core/elements/link.rb
|
50
53
|
- lib/webrat/core/elements/select_option.rb
|
51
|
-
- lib/webrat/core/locators
|
54
|
+
- lib/webrat/core/locators.rb
|
52
55
|
- lib/webrat/core/locators/area_locator.rb
|
53
56
|
- lib/webrat/core/locators/button_locator.rb
|
54
57
|
- lib/webrat/core/locators/field_by_id_locator.rb
|
@@ -60,26 +63,21 @@ files:
|
|
60
63
|
- lib/webrat/core/locators/link_locator.rb
|
61
64
|
- lib/webrat/core/locators/locator.rb
|
62
65
|
- lib/webrat/core/locators/select_option_locator.rb
|
63
|
-
- lib/webrat/core/locators.rb
|
64
66
|
- lib/webrat/core/logging.rb
|
65
|
-
- lib/webrat/core/matchers
|
67
|
+
- lib/webrat/core/matchers.rb
|
66
68
|
- lib/webrat/core/matchers/have_content.rb
|
67
69
|
- lib/webrat/core/matchers/have_selector.rb
|
68
70
|
- lib/webrat/core/matchers/have_tag.rb
|
69
71
|
- lib/webrat/core/matchers/have_xpath.rb
|
70
|
-
- lib/webrat/core/matchers.rb
|
71
72
|
- lib/webrat/core/methods.rb
|
72
73
|
- lib/webrat/core/mime.rb
|
73
74
|
- lib/webrat/core/save_and_open_page.rb
|
74
75
|
- lib/webrat/core/scope.rb
|
75
76
|
- lib/webrat/core/session.rb
|
76
|
-
- lib/webrat/core/xml
|
77
|
+
- lib/webrat/core/xml.rb
|
77
78
|
- lib/webrat/core/xml/hpricot.rb
|
78
79
|
- lib/webrat/core/xml/nokogiri.rb
|
79
80
|
- lib/webrat/core/xml/rexml.rb
|
80
|
-
- lib/webrat/core/xml.rb
|
81
|
-
- lib/webrat/core.rb
|
82
|
-
- lib/webrat/core_extensions
|
83
81
|
- lib/webrat/core_extensions/blank.rb
|
84
82
|
- lib/webrat/core_extensions/deprecate.rb
|
85
83
|
- lib/webrat/core_extensions/detect_mapped.rb
|
@@ -88,40 +86,171 @@ files:
|
|
88
86
|
- lib/webrat/core_extensions/tcp_socket.rb
|
89
87
|
- lib/webrat/mechanize.rb
|
90
88
|
- lib/webrat/merb.rb
|
89
|
+
- lib/webrat/merb_multipart_support.rb
|
91
90
|
- lib/webrat/merb_session.rb
|
92
91
|
- lib/webrat/rack.rb
|
92
|
+
- lib/webrat/rack_test.rb
|
93
93
|
- lib/webrat/rails.rb
|
94
94
|
- lib/webrat/rspec-rails.rb
|
95
|
-
- lib/webrat/selenium
|
96
|
-
- lib/webrat/selenium/
|
97
|
-
- lib/webrat/selenium/
|
95
|
+
- lib/webrat/selenium.rb
|
96
|
+
- lib/webrat/selenium/application_server_factory.rb
|
97
|
+
- lib/webrat/selenium/application_servers.rb
|
98
|
+
- lib/webrat/selenium/application_servers/base.rb
|
99
|
+
- lib/webrat/selenium/application_servers/external.rb
|
100
|
+
- lib/webrat/selenium/application_servers/merb.rb
|
101
|
+
- lib/webrat/selenium/application_servers/rails.rb
|
102
|
+
- lib/webrat/selenium/application_servers/sinatra.rb
|
98
103
|
- lib/webrat/selenium/location_strategy_javascript/button.js
|
99
104
|
- lib/webrat/selenium/location_strategy_javascript/label.js
|
100
105
|
- lib/webrat/selenium/location_strategy_javascript/webrat.js
|
101
106
|
- lib/webrat/selenium/location_strategy_javascript/webratlink.js
|
102
107
|
- lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js
|
103
108
|
- lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js
|
104
|
-
- lib/webrat/selenium/matchers
|
109
|
+
- lib/webrat/selenium/matchers.rb
|
105
110
|
- lib/webrat/selenium/matchers/have_content.rb
|
106
111
|
- lib/webrat/selenium/matchers/have_selector.rb
|
107
112
|
- lib/webrat/selenium/matchers/have_tag.rb
|
108
113
|
- 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
114
|
- lib/webrat/selenium/selenium_extensions.js
|
113
115
|
- lib/webrat/selenium/selenium_rc_server.rb
|
114
116
|
- lib/webrat/selenium/selenium_session.rb
|
115
|
-
- lib/webrat/selenium/
|
116
|
-
- lib/webrat/selenium.rb
|
117
|
+
- lib/webrat/selenium/silence_stream.rb
|
117
118
|
- lib/webrat/sinatra.rb
|
118
|
-
-
|
119
|
+
- spec/fakes/test_session.rb
|
120
|
+
- spec/integration/merb/.gitignore
|
121
|
+
- spec/integration/merb/Rakefile
|
122
|
+
- spec/integration/merb/app/controllers/application.rb
|
123
|
+
- spec/integration/merb/app/controllers/exceptions.rb
|
124
|
+
- spec/integration/merb/app/controllers/testing.rb
|
125
|
+
- spec/integration/merb/app/views/exceptions/not_acceptable.html.erb
|
126
|
+
- spec/integration/merb/app/views/exceptions/not_found.html.erb
|
127
|
+
- spec/integration/merb/app/views/layout/application.html.erb
|
128
|
+
- spec/integration/merb/app/views/testing/show_form.html.erb
|
129
|
+
- spec/integration/merb/app/views/testing/upload.html.erb
|
130
|
+
- spec/integration/merb/config/environments/development.rb
|
131
|
+
- spec/integration/merb/config/environments/rake.rb
|
132
|
+
- spec/integration/merb/config/environments/test.rb
|
133
|
+
- spec/integration/merb/config/init.rb
|
134
|
+
- spec/integration/merb/config/rack.rb
|
135
|
+
- spec/integration/merb/config/router.rb
|
136
|
+
- spec/integration/merb/spec/spec.opts
|
137
|
+
- spec/integration/merb/spec/spec_helper.rb
|
138
|
+
- spec/integration/merb/spec/webrat_spec.rb
|
139
|
+
- spec/integration/merb/tasks/merb.thor/app_script.rb
|
140
|
+
- spec/integration/merb/tasks/merb.thor/common.rb
|
141
|
+
- spec/integration/merb/tasks/merb.thor/gem_ext.rb
|
142
|
+
- spec/integration/merb/tasks/merb.thor/main.thor
|
143
|
+
- spec/integration/merb/tasks/merb.thor/ops.rb
|
144
|
+
- spec/integration/merb/tasks/merb.thor/utils.rb
|
145
|
+
- spec/integration/rack/Rakefile
|
146
|
+
- spec/integration/rack/rack_app.rb
|
147
|
+
- spec/integration/rack/test/test_helper.rb
|
148
|
+
- spec/integration/rack/test/webrat_rack_test.rb
|
149
|
+
- spec/integration/rails/.gitignore
|
150
|
+
- spec/integration/rails/Rakefile
|
151
|
+
- spec/integration/rails/app/controllers/application.rb
|
152
|
+
- spec/integration/rails/app/controllers/buttons_controller.rb
|
153
|
+
- spec/integration/rails/app/controllers/fields_controller.rb
|
154
|
+
- spec/integration/rails/app/controllers/links_controller.rb
|
155
|
+
- spec/integration/rails/app/controllers/webrat_controller.rb
|
156
|
+
- spec/integration/rails/app/helpers/buttons_helper.rb
|
157
|
+
- spec/integration/rails/app/helpers/fields_helper.rb
|
158
|
+
- spec/integration/rails/app/helpers/links_helper.rb
|
159
|
+
- spec/integration/rails/app/views/buttons/show.html.erb
|
160
|
+
- spec/integration/rails/app/views/fields/show.html.erb
|
161
|
+
- spec/integration/rails/app/views/links/show.html.erb
|
162
|
+
- spec/integration/rails/app/views/webrat/before_redirect_form.html.erb
|
163
|
+
- spec/integration/rails/app/views/webrat/buttons.html.erb
|
164
|
+
- spec/integration/rails/app/views/webrat/form.html.erb
|
165
|
+
- spec/integration/rails/config/boot.rb
|
166
|
+
- spec/integration/rails/config/environment.rb
|
167
|
+
- spec/integration/rails/config/environments/development.rb
|
168
|
+
- spec/integration/rails/config/environments/selenium.rb
|
169
|
+
- spec/integration/rails/config/environments/test.rb
|
170
|
+
- spec/integration/rails/config/initializers/inflections.rb
|
171
|
+
- spec/integration/rails/config/initializers/mime_types.rb
|
172
|
+
- spec/integration/rails/config/initializers/new_rails_defaults.rb
|
173
|
+
- spec/integration/rails/config/locales/en.yml
|
174
|
+
- spec/integration/rails/config/routes.rb
|
175
|
+
- spec/integration/rails/public/404.html
|
176
|
+
- spec/integration/rails/public/422.html
|
177
|
+
- spec/integration/rails/public/500.html
|
178
|
+
- spec/integration/rails/script/about
|
179
|
+
- spec/integration/rails/script/console
|
180
|
+
- spec/integration/rails/script/dbconsole
|
181
|
+
- spec/integration/rails/script/destroy
|
182
|
+
- spec/integration/rails/script/generate
|
183
|
+
- spec/integration/rails/script/performance/benchmarker
|
184
|
+
- spec/integration/rails/script/performance/profiler
|
185
|
+
- spec/integration/rails/script/performance/request
|
186
|
+
- spec/integration/rails/script/plugin
|
187
|
+
- spec/integration/rails/script/process/inspector
|
188
|
+
- spec/integration/rails/script/process/reaper
|
189
|
+
- spec/integration/rails/script/process/spawner
|
190
|
+
- spec/integration/rails/script/runner
|
191
|
+
- spec/integration/rails/script/server
|
192
|
+
- spec/integration/rails/test/integration/button_click_test.rb
|
193
|
+
- spec/integration/rails/test/integration/fill_in_test.rb
|
194
|
+
- spec/integration/rails/test/integration/link_click_test.rb
|
195
|
+
- spec/integration/rails/test/integration/webrat_test.rb
|
196
|
+
- spec/integration/rails/test/test_helper.rb
|
197
|
+
- spec/integration/sinatra/Rakefile
|
198
|
+
- spec/integration/sinatra/classic_app.rb
|
199
|
+
- spec/integration/sinatra/modular_app.rb
|
200
|
+
- spec/integration/sinatra/test/classic_app_test.rb
|
201
|
+
- spec/integration/sinatra/test/modular_app_test.rb
|
202
|
+
- spec/integration/sinatra/test/test_helper.rb
|
203
|
+
- spec/private/core/configuration_spec.rb
|
204
|
+
- spec/private/core/field_spec.rb
|
205
|
+
- spec/private/core/link_spec.rb
|
206
|
+
- spec/private/core/logging_spec.rb
|
207
|
+
- spec/private/core/session_spec.rb
|
208
|
+
- spec/private/mechanize/mechanize_session_spec.rb
|
209
|
+
- spec/private/merb/attaches_file_spec.rb
|
210
|
+
- spec/private/merb/merb_session_spec.rb
|
211
|
+
- spec/private/nokogiri_spec.rb
|
212
|
+
- spec/private/rails/attaches_file_spec.rb
|
213
|
+
- spec/private/rails/rails_session_spec.rb
|
214
|
+
- spec/private/selenium/application_servers/rails_spec.rb
|
215
|
+
- spec/public/basic_auth_spec.rb
|
216
|
+
- spec/public/check_spec.rb
|
217
|
+
- spec/public/choose_spec.rb
|
218
|
+
- spec/public/click_area_spec.rb
|
219
|
+
- spec/public/click_button_spec.rb
|
220
|
+
- spec/public/click_link_spec.rb
|
221
|
+
- spec/public/fill_in_spec.rb
|
222
|
+
- spec/public/locators/field_by_xpath_spec.rb
|
223
|
+
- spec/public/locators/field_labeled_spec.rb
|
224
|
+
- spec/public/locators/field_with_id_spec.rb
|
225
|
+
- spec/public/matchers/contain_spec.rb
|
226
|
+
- spec/public/matchers/have_selector_spec.rb
|
227
|
+
- spec/public/matchers/have_tag_spec.rb
|
228
|
+
- spec/public/matchers/have_xpath_spec.rb
|
229
|
+
- spec/public/reload_spec.rb
|
230
|
+
- spec/public/save_and_open_spec.rb
|
231
|
+
- spec/public/select_date_spec.rb
|
232
|
+
- spec/public/select_datetime_spec.rb
|
233
|
+
- spec/public/select_spec.rb
|
234
|
+
- spec/public/select_time_spec.rb
|
235
|
+
- spec/public/selenium/application_server_factory_spec.rb
|
236
|
+
- spec/public/selenium/application_servers/external_spec.rb
|
237
|
+
- spec/public/selenium/selenium_session_spec.rb
|
238
|
+
- spec/public/set_hidden_field_spec.rb
|
239
|
+
- spec/public/submit_form_spec.rb
|
240
|
+
- spec/public/visit_spec.rb
|
241
|
+
- spec/public/within_spec.rb
|
242
|
+
- spec/rcov.opts
|
243
|
+
- spec/spec.opts
|
244
|
+
- spec/spec_helper.rb
|
119
245
|
- vendor/selenium-server.jar
|
246
|
+
- webrat.gemspec
|
120
247
|
has_rdoc: true
|
121
248
|
homepage: http://github.com/brynary/webrat
|
122
|
-
|
123
|
-
rdoc_options: []
|
249
|
+
licenses: []
|
124
250
|
|
251
|
+
post_install_message:
|
252
|
+
rdoc_options:
|
253
|
+
- --charset=UTF-8
|
125
254
|
require_paths:
|
126
255
|
- lib
|
127
256
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -139,9 +268,95 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
268
|
requirements: []
|
140
269
|
|
141
270
|
rubyforge_project: webrat
|
142
|
-
rubygems_version: 1.3.
|
271
|
+
rubygems_version: 1.3.4
|
143
272
|
signing_key:
|
144
|
-
specification_version:
|
145
|
-
summary:
|
146
|
-
test_files:
|
147
|
-
|
273
|
+
specification_version: 3
|
274
|
+
summary: Ruby Acceptance Testing for Web applications
|
275
|
+
test_files:
|
276
|
+
- spec/fakes/test_session.rb
|
277
|
+
- spec/integration/merb/app/controllers/application.rb
|
278
|
+
- spec/integration/merb/app/controllers/exceptions.rb
|
279
|
+
- spec/integration/merb/app/controllers/testing.rb
|
280
|
+
- spec/integration/merb/config/environments/development.rb
|
281
|
+
- spec/integration/merb/config/environments/rake.rb
|
282
|
+
- spec/integration/merb/config/environments/test.rb
|
283
|
+
- spec/integration/merb/config/init.rb
|
284
|
+
- spec/integration/merb/config/rack.rb
|
285
|
+
- spec/integration/merb/config/router.rb
|
286
|
+
- spec/integration/merb/spec/spec_helper.rb
|
287
|
+
- spec/integration/merb/spec/webrat_spec.rb
|
288
|
+
- spec/integration/merb/tasks/merb.thor/app_script.rb
|
289
|
+
- spec/integration/merb/tasks/merb.thor/common.rb
|
290
|
+
- spec/integration/merb/tasks/merb.thor/gem_ext.rb
|
291
|
+
- spec/integration/merb/tasks/merb.thor/ops.rb
|
292
|
+
- spec/integration/merb/tasks/merb.thor/utils.rb
|
293
|
+
- spec/integration/rack/rack_app.rb
|
294
|
+
- spec/integration/rack/test/test_helper.rb
|
295
|
+
- spec/integration/rack/test/webrat_rack_test.rb
|
296
|
+
- spec/integration/rails/app/controllers/application.rb
|
297
|
+
- spec/integration/rails/app/controllers/buttons_controller.rb
|
298
|
+
- spec/integration/rails/app/controllers/fields_controller.rb
|
299
|
+
- spec/integration/rails/app/controllers/links_controller.rb
|
300
|
+
- spec/integration/rails/app/controllers/webrat_controller.rb
|
301
|
+
- spec/integration/rails/app/helpers/buttons_helper.rb
|
302
|
+
- spec/integration/rails/app/helpers/fields_helper.rb
|
303
|
+
- spec/integration/rails/app/helpers/links_helper.rb
|
304
|
+
- spec/integration/rails/config/boot.rb
|
305
|
+
- spec/integration/rails/config/environment.rb
|
306
|
+
- spec/integration/rails/config/environments/development.rb
|
307
|
+
- spec/integration/rails/config/environments/selenium.rb
|
308
|
+
- spec/integration/rails/config/environments/test.rb
|
309
|
+
- spec/integration/rails/config/initializers/inflections.rb
|
310
|
+
- spec/integration/rails/config/initializers/mime_types.rb
|
311
|
+
- spec/integration/rails/config/initializers/new_rails_defaults.rb
|
312
|
+
- spec/integration/rails/config/routes.rb
|
313
|
+
- spec/integration/rails/test/integration/button_click_test.rb
|
314
|
+
- spec/integration/rails/test/integration/fill_in_test.rb
|
315
|
+
- spec/integration/rails/test/integration/link_click_test.rb
|
316
|
+
- spec/integration/rails/test/integration/webrat_test.rb
|
317
|
+
- spec/integration/rails/test/test_helper.rb
|
318
|
+
- spec/integration/sinatra/classic_app.rb
|
319
|
+
- spec/integration/sinatra/modular_app.rb
|
320
|
+
- spec/integration/sinatra/test/classic_app_test.rb
|
321
|
+
- spec/integration/sinatra/test/modular_app_test.rb
|
322
|
+
- spec/integration/sinatra/test/test_helper.rb
|
323
|
+
- spec/private/core/configuration_spec.rb
|
324
|
+
- spec/private/core/field_spec.rb
|
325
|
+
- spec/private/core/link_spec.rb
|
326
|
+
- spec/private/core/logging_spec.rb
|
327
|
+
- spec/private/core/session_spec.rb
|
328
|
+
- spec/private/mechanize/mechanize_session_spec.rb
|
329
|
+
- spec/private/merb/attaches_file_spec.rb
|
330
|
+
- spec/private/merb/merb_session_spec.rb
|
331
|
+
- spec/private/nokogiri_spec.rb
|
332
|
+
- spec/private/rails/attaches_file_spec.rb
|
333
|
+
- spec/private/rails/rails_session_spec.rb
|
334
|
+
- spec/private/selenium/application_servers/rails_spec.rb
|
335
|
+
- spec/public/basic_auth_spec.rb
|
336
|
+
- spec/public/check_spec.rb
|
337
|
+
- spec/public/choose_spec.rb
|
338
|
+
- spec/public/click_area_spec.rb
|
339
|
+
- spec/public/click_button_spec.rb
|
340
|
+
- spec/public/click_link_spec.rb
|
341
|
+
- spec/public/fill_in_spec.rb
|
342
|
+
- spec/public/locators/field_by_xpath_spec.rb
|
343
|
+
- spec/public/locators/field_labeled_spec.rb
|
344
|
+
- spec/public/locators/field_with_id_spec.rb
|
345
|
+
- spec/public/matchers/contain_spec.rb
|
346
|
+
- spec/public/matchers/have_selector_spec.rb
|
347
|
+
- spec/public/matchers/have_tag_spec.rb
|
348
|
+
- spec/public/matchers/have_xpath_spec.rb
|
349
|
+
- spec/public/reload_spec.rb
|
350
|
+
- spec/public/save_and_open_spec.rb
|
351
|
+
- spec/public/select_date_spec.rb
|
352
|
+
- spec/public/select_datetime_spec.rb
|
353
|
+
- spec/public/select_spec.rb
|
354
|
+
- spec/public/select_time_spec.rb
|
355
|
+
- spec/public/selenium/application_server_factory_spec.rb
|
356
|
+
- spec/public/selenium/application_servers/external_spec.rb
|
357
|
+
- spec/public/selenium/selenium_session_spec.rb
|
358
|
+
- spec/public/set_hidden_field_spec.rb
|
359
|
+
- spec/public/submit_form_spec.rb
|
360
|
+
- spec/public/visit_spec.rb
|
361
|
+
- spec/public/within_spec.rb
|
362
|
+
- spec/spec_helper.rb
|
@@ -1,71 +0,0 @@
|
|
1
|
-
module Webrat
|
2
|
-
module Selenium
|
3
|
-
|
4
|
-
class ApplicationServer
|
5
|
-
|
6
|
-
def self.boot
|
7
|
-
case Webrat.configuration.application_framework
|
8
|
-
when :sinatra
|
9
|
-
require "webrat/selenium/sinatra_application_server"
|
10
|
-
SinatraApplicationServer.new.boot
|
11
|
-
when :merb
|
12
|
-
require "webrat/selenium/merb_application_server"
|
13
|
-
MerbApplicationServer.new.boot
|
14
|
-
when :rails
|
15
|
-
require "webrat/selenium/rails_application_server"
|
16
|
-
RailsApplicationServer.new.boot
|
17
|
-
else
|
18
|
-
raise WebratError.new(<<-STR)
|
19
|
-
Unknown Webrat application_framework: #{Webrat.configuration.application_framework.inspect}
|
20
|
-
|
21
|
-
Please ensure you have a Webrat configuration block that specifies an application_framework
|
22
|
-
in your test_helper.rb, spec_helper.rb, or env.rb (for Cucumber).
|
23
|
-
|
24
|
-
For example:
|
25
|
-
|
26
|
-
Webrat.configure do |config|
|
27
|
-
# ...
|
28
|
-
config.application_framework = :rails
|
29
|
-
end
|
30
|
-
STR
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def boot
|
35
|
-
start
|
36
|
-
wait
|
37
|
-
stop_at_exit
|
38
|
-
end
|
39
|
-
|
40
|
-
def stop_at_exit
|
41
|
-
at_exit do
|
42
|
-
stop
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def wait
|
47
|
-
$stderr.print "==> Waiting for #{Webrat.configuration.application_framework} application server on port #{Webrat.configuration.application_port}... "
|
48
|
-
wait_for_socket
|
49
|
-
$stderr.print "Ready!\n"
|
50
|
-
end
|
51
|
-
|
52
|
-
def wait_for_socket
|
53
|
-
silence_stream(STDOUT) do
|
54
|
-
TCPSocket.wait_for_service_with_timeout \
|
55
|
-
:host => Webrat.configuration.application_address,
|
56
|
-
:port => Webrat.configuration.application_port.to_i,
|
57
|
-
:timeout => 30 # seconds
|
58
|
-
end
|
59
|
-
rescue SocketError
|
60
|
-
fail
|
61
|
-
end
|
62
|
-
|
63
|
-
def prepare_pid_file(file_path, pid_file_name)
|
64
|
-
FileUtils.mkdir_p File.expand_path(file_path)
|
65
|
-
File.expand_path("#{file_path}/#{pid_file_name}")
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
module Webrat
|
2
|
-
module Selenium
|
3
|
-
|
4
|
-
class MerbApplicationServer < ApplicationServer
|
5
|
-
|
6
|
-
def start
|
7
|
-
system start_command
|
8
|
-
end
|
9
|
-
|
10
|
-
def stop
|
11
|
-
silence_stream(STDOUT) do
|
12
|
-
pid = File.read(pid_file)
|
13
|
-
system("kill -9 #{pid}")
|
14
|
-
FileUtils.rm_f pid_file
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def fail
|
19
|
-
$stderr.puts
|
20
|
-
$stderr.puts
|
21
|
-
$stderr.puts "==> Failed to boot the Merb application server... exiting!"
|
22
|
-
$stderr.puts
|
23
|
-
$stderr.puts "Verify you can start a Merb server on port #{Webrat.configuration.application_port} with the following command:"
|
24
|
-
$stderr.puts
|
25
|
-
$stderr.puts " #{start_command}"
|
26
|
-
exit
|
27
|
-
end
|
28
|
-
|
29
|
-
def pid_file
|
30
|
-
"log/merb.#{Webrat.configuration.application_port}.pid"
|
31
|
-
end
|
32
|
-
|
33
|
-
def start_command
|
34
|
-
"#{merb_command} -d -p #{Webrat.configuration.application_port} -e #{Webrat.configuration.application_environment}"
|
35
|
-
end
|
36
|
-
|
37
|
-
def merb_command
|
38
|
-
if File.exist?('bin/merb')
|
39
|
-
merb_cmd = 'bin/merb'
|
40
|
-
else
|
41
|
-
merb_cmd = 'merb'
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
48
|
-
end
|