capybara_rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +38 -0
  4. data/lib/capybara_rails.rb +4 -0
  5. data/lib/capybara_rails/basic.rb +7 -0
  6. data/lib/capybara_rails/railtie.rb +12 -0
  7. data/lib/capybara_rails/selenium.rb +49 -0
  8. data/lib/capybara_rails/version.rb +3 -0
  9. data/lib/tasks/capybara_rails_tasks.rake +4 -0
  10. data/test/capybara_rails_test.rb +7 -0
  11. data/test/dummy/README.rdoc +261 -0
  12. data/test/dummy/Rakefile +7 -0
  13. data/test/dummy/app/assets/javascripts/application.js +17 -0
  14. data/test/dummy/app/assets/javascripts/welcome.js +2 -0
  15. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  16. data/test/dummy/app/assets/stylesheets/welcome.css +4 -0
  17. data/test/dummy/app/controllers/application_controller.rb +3 -0
  18. data/test/dummy/app/controllers/welcome_controller.rb +4 -0
  19. data/test/dummy/app/helpers/application_helper.rb +2 -0
  20. data/test/dummy/app/helpers/welcome_helper.rb +2 -0
  21. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  22. data/test/dummy/app/views/welcome/index.html.erb +2 -0
  23. data/test/dummy/config.ru +4 -0
  24. data/test/dummy/config/application.rb +56 -0
  25. data/test/dummy/config/boot.rb +10 -0
  26. data/test/dummy/config/database.yml +25 -0
  27. data/test/dummy/config/environment.rb +5 -0
  28. data/test/dummy/config/environments/development.rb +37 -0
  29. data/test/dummy/config/environments/production.rb +67 -0
  30. data/test/dummy/config/environments/test.rb +37 -0
  31. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  32. data/test/dummy/config/initializers/inflections.rb +15 -0
  33. data/test/dummy/config/initializers/mime_types.rb +5 -0
  34. data/test/dummy/config/initializers/secret_token.rb +7 -0
  35. data/test/dummy/config/initializers/session_store.rb +8 -0
  36. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  37. data/test/dummy/config/locales/en.yml +5 -0
  38. data/test/dummy/config/routes.rb +3 -0
  39. data/test/dummy/db/test.sqlite3 +0 -0
  40. data/test/dummy/log/development.log +0 -0
  41. data/test/dummy/log/test.log +628 -0
  42. data/test/dummy/public/404.html +26 -0
  43. data/test/dummy/public/422.html +26 -0
  44. data/test/dummy/public/500.html +25 -0
  45. data/test/dummy/public/favicon.ico +0 -0
  46. data/test/dummy/script/rails +6 -0
  47. data/test/dummy/test/integration/basic_capybara_test.rb +8 -0
  48. data/test/dummy/test/integration/firebug_capybara_test.rb +13 -0
  49. data/test/dummy/test/integration/javascript_capybara_test.rb +10 -0
  50. data/test/dummy/test/unit/helpers/welcome_helper_test.rb +4 -0
  51. data/test/dummy/tmp/cache/assets/C7B/190/sprockets%2F37b103f4623089af1456b90830fe941c +0 -0
  52. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  53. data/test/dummy/tmp/cache/assets/D13/C60/sprockets%2F2dedb8177c20286c4259c1d58c5646cc +0 -0
  54. data/test/dummy/tmp/cache/assets/D21/5D0/sprockets%2Fe2c4f946939f2d7d0b42d86383755cae +0 -0
  55. data/test/dummy/tmp/cache/assets/D31/310/sprockets%2Fe2e176818da274b6f14412ec51dca0a7 +0 -0
  56. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  57. data/test/dummy/tmp/cache/assets/D3E/F40/sprockets%2F25a167c7563d6fe8ec6b13ec1ac09274 +0 -0
  58. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  59. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  60. data/test/dummy/tmp/cache/assets/D7A/A60/sprockets%2F4155fdcab3373e1e8989ef6f46e11c6a +0 -0
  61. data/test/dummy/tmp/cache/assets/D8A/700/sprockets%2F13a1216a805a8ef86ffb3b3aa36c33ad +0 -0
  62. data/test/dummy/tmp/cache/assets/D8E/540/sprockets%2F42bd064a68dcc4b7a1d813fed1c06e06 +0 -0
  63. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  64. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  65. data/test/test_helper.rb +10 -0
  66. metadata +228 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ class BasicCapybaraTest < ActionDispatch::IntegrationTest
4
+ test "the home page" do
5
+ visit "/"
6
+ assert page.has_content? "Find me in"
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class FirebugCapybaraTest < ActionDispatch::IntegrationTest
4
+ javascript
5
+ firebug
6
+
7
+ test "the home page" do
8
+ visit "/"
9
+
10
+ # Using method from http://stackoverflow.com/a/398120/69002
11
+ wait_until { page.evaluate_script("window.console.exception") }
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class JavascriptCapybaraTest < ActionDispatch::IntegrationTest
4
+ javascript
5
+
6
+ test "the home page" do
7
+ visit "/"
8
+ wait_until { page.evaluate_script("window.ranJS") }
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class WelcomeHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,10 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata ADDED
@@ -0,0 +1,228 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capybara_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mat Schaffer
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-18 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70285685320720 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70285685320720
25
+ - !ruby/object:Gem::Dependency
26
+ name: capybara
27
+ requirement: &70285685288100 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 1.1.2
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70285685288100
36
+ - !ruby/object:Gem::Dependency
37
+ name: capybara-firebug
38
+ requirement: &70285685285160 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.1.0
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70285685285160
47
+ - !ruby/object:Gem::Dependency
48
+ name: database_cleaner
49
+ requirement: &70285685275460 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.7.1
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70285685275460
58
+ - !ruby/object:Gem::Dependency
59
+ name: sqlite3
60
+ requirement: &70285685274160 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70285685274160
69
+ description: A binding for the built-in Rails integration testing that allows for
70
+ calling the Capybara DSL, setting drivers, etc.
71
+ email:
72
+ - mat@schaffer.me
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - lib/capybara_rails/basic.rb
78
+ - lib/capybara_rails/railtie.rb
79
+ - lib/capybara_rails/selenium.rb
80
+ - lib/capybara_rails/version.rb
81
+ - lib/capybara_rails.rb
82
+ - lib/tasks/capybara_rails_tasks.rake
83
+ - MIT-LICENSE
84
+ - Rakefile
85
+ - README.rdoc
86
+ - test/capybara_rails_test.rb
87
+ - test/dummy/app/assets/javascripts/application.js
88
+ - test/dummy/app/assets/javascripts/welcome.js
89
+ - test/dummy/app/assets/stylesheets/application.css
90
+ - test/dummy/app/assets/stylesheets/welcome.css
91
+ - test/dummy/app/controllers/application_controller.rb
92
+ - test/dummy/app/controllers/welcome_controller.rb
93
+ - test/dummy/app/helpers/application_helper.rb
94
+ - test/dummy/app/helpers/welcome_helper.rb
95
+ - test/dummy/app/views/layouts/application.html.erb
96
+ - test/dummy/app/views/welcome/index.html.erb
97
+ - test/dummy/config/application.rb
98
+ - test/dummy/config/boot.rb
99
+ - test/dummy/config/database.yml
100
+ - test/dummy/config/environment.rb
101
+ - test/dummy/config/environments/development.rb
102
+ - test/dummy/config/environments/production.rb
103
+ - test/dummy/config/environments/test.rb
104
+ - test/dummy/config/initializers/backtrace_silencers.rb
105
+ - test/dummy/config/initializers/inflections.rb
106
+ - test/dummy/config/initializers/mime_types.rb
107
+ - test/dummy/config/initializers/secret_token.rb
108
+ - test/dummy/config/initializers/session_store.rb
109
+ - test/dummy/config/initializers/wrap_parameters.rb
110
+ - test/dummy/config/locales/en.yml
111
+ - test/dummy/config/routes.rb
112
+ - test/dummy/config.ru
113
+ - test/dummy/db/test.sqlite3
114
+ - test/dummy/log/development.log
115
+ - test/dummy/log/test.log
116
+ - test/dummy/public/404.html
117
+ - test/dummy/public/422.html
118
+ - test/dummy/public/500.html
119
+ - test/dummy/public/favicon.ico
120
+ - test/dummy/Rakefile
121
+ - test/dummy/README.rdoc
122
+ - test/dummy/script/rails
123
+ - test/dummy/test/integration/basic_capybara_test.rb
124
+ - test/dummy/test/integration/firebug_capybara_test.rb
125
+ - test/dummy/test/integration/javascript_capybara_test.rb
126
+ - test/dummy/test/unit/helpers/welcome_helper_test.rb
127
+ - test/dummy/tmp/cache/assets/C7B/190/sprockets%2F37b103f4623089af1456b90830fe941c
128
+ - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
129
+ - test/dummy/tmp/cache/assets/D13/C60/sprockets%2F2dedb8177c20286c4259c1d58c5646cc
130
+ - test/dummy/tmp/cache/assets/D21/5D0/sprockets%2Fe2c4f946939f2d7d0b42d86383755cae
131
+ - test/dummy/tmp/cache/assets/D31/310/sprockets%2Fe2e176818da274b6f14412ec51dca0a7
132
+ - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
133
+ - test/dummy/tmp/cache/assets/D3E/F40/sprockets%2F25a167c7563d6fe8ec6b13ec1ac09274
134
+ - test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
135
+ - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
136
+ - test/dummy/tmp/cache/assets/D7A/A60/sprockets%2F4155fdcab3373e1e8989ef6f46e11c6a
137
+ - test/dummy/tmp/cache/assets/D8A/700/sprockets%2F13a1216a805a8ef86ffb3b3aa36c33ad
138
+ - test/dummy/tmp/cache/assets/D8E/540/sprockets%2F42bd064a68dcc4b7a1d813fed1c06e06
139
+ - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
140
+ - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
141
+ - test/test_helper.rb
142
+ homepage: http://mashion.new
143
+ licenses: []
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ segments:
155
+ - 0
156
+ hash: 3028217596356124078
157
+ required_rubygems_version: !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ segments:
164
+ - 0
165
+ hash: 3028217596356124078
166
+ requirements: []
167
+ rubyforge_project:
168
+ rubygems_version: 1.8.15
169
+ signing_key:
170
+ specification_version: 3
171
+ summary: Capybara integration testing for Rails & Test::Unit
172
+ test_files:
173
+ - test/capybara_rails_test.rb
174
+ - test/dummy/app/assets/javascripts/application.js
175
+ - test/dummy/app/assets/javascripts/welcome.js
176
+ - test/dummy/app/assets/stylesheets/application.css
177
+ - test/dummy/app/assets/stylesheets/welcome.css
178
+ - test/dummy/app/controllers/application_controller.rb
179
+ - test/dummy/app/controllers/welcome_controller.rb
180
+ - test/dummy/app/helpers/application_helper.rb
181
+ - test/dummy/app/helpers/welcome_helper.rb
182
+ - test/dummy/app/views/layouts/application.html.erb
183
+ - test/dummy/app/views/welcome/index.html.erb
184
+ - test/dummy/config/application.rb
185
+ - test/dummy/config/boot.rb
186
+ - test/dummy/config/database.yml
187
+ - test/dummy/config/environment.rb
188
+ - test/dummy/config/environments/development.rb
189
+ - test/dummy/config/environments/production.rb
190
+ - test/dummy/config/environments/test.rb
191
+ - test/dummy/config/initializers/backtrace_silencers.rb
192
+ - test/dummy/config/initializers/inflections.rb
193
+ - test/dummy/config/initializers/mime_types.rb
194
+ - test/dummy/config/initializers/secret_token.rb
195
+ - test/dummy/config/initializers/session_store.rb
196
+ - test/dummy/config/initializers/wrap_parameters.rb
197
+ - test/dummy/config/locales/en.yml
198
+ - test/dummy/config/routes.rb
199
+ - test/dummy/config.ru
200
+ - test/dummy/db/test.sqlite3
201
+ - test/dummy/log/development.log
202
+ - test/dummy/log/test.log
203
+ - test/dummy/public/404.html
204
+ - test/dummy/public/422.html
205
+ - test/dummy/public/500.html
206
+ - test/dummy/public/favicon.ico
207
+ - test/dummy/Rakefile
208
+ - test/dummy/README.rdoc
209
+ - test/dummy/script/rails
210
+ - test/dummy/test/integration/basic_capybara_test.rb
211
+ - test/dummy/test/integration/firebug_capybara_test.rb
212
+ - test/dummy/test/integration/javascript_capybara_test.rb
213
+ - test/dummy/test/unit/helpers/welcome_helper_test.rb
214
+ - test/dummy/tmp/cache/assets/C7B/190/sprockets%2F37b103f4623089af1456b90830fe941c
215
+ - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
216
+ - test/dummy/tmp/cache/assets/D13/C60/sprockets%2F2dedb8177c20286c4259c1d58c5646cc
217
+ - test/dummy/tmp/cache/assets/D21/5D0/sprockets%2Fe2c4f946939f2d7d0b42d86383755cae
218
+ - test/dummy/tmp/cache/assets/D31/310/sprockets%2Fe2e176818da274b6f14412ec51dca0a7
219
+ - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
220
+ - test/dummy/tmp/cache/assets/D3E/F40/sprockets%2F25a167c7563d6fe8ec6b13ec1ac09274
221
+ - test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
222
+ - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
223
+ - test/dummy/tmp/cache/assets/D7A/A60/sprockets%2F4155fdcab3373e1e8989ef6f46e11c6a
224
+ - test/dummy/tmp/cache/assets/D8A/700/sprockets%2F13a1216a805a8ef86ffb3b3aa36c33ad
225
+ - test/dummy/tmp/cache/assets/D8E/540/sprockets%2F42bd064a68dcc4b7a1d813fed1c06e06
226
+ - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
227
+ - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
228
+ - test/test_helper.rb