capybara_minitest_spec 0.1.0

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 (70) hide show
  1. data/.gemtest +0 -0
  2. data/.gitignore +4 -0
  3. data/.gitmodules +3 -0
  4. data/.rvmrc +1 -0
  5. data/Gemfile +7 -0
  6. data/README.md +31 -0
  7. data/Rakefile +9 -0
  8. data/capybara_minitest_spec.gemspec +25 -0
  9. data/lib/capybara_minitest_spec/version.rb +3 -0
  10. data/lib/capybara_minitest_spec.rb +45 -0
  11. data/test/matchers_spec.rb +447 -0
  12. data/test/spec_helper.rb +28 -0
  13. data/test_app/driver.rb +297 -0
  14. data/test_app/fixtures/capybara.jpg +3 -0
  15. data/test_app/fixtures/test_file.txt +1 -0
  16. data/test_app/public/test.js +43 -0
  17. data/test_app/session/all_spec.rb +78 -0
  18. data/test_app/session/attach_file_spec.rb +73 -0
  19. data/test_app/session/check_spec.rb +65 -0
  20. data/test_app/session/choose_spec.rb +26 -0
  21. data/test_app/session/click_button_spec.rb +304 -0
  22. data/test_app/session/click_link_or_button_spec.rb +36 -0
  23. data/test_app/session/click_link_spec.rb +119 -0
  24. data/test_app/session/current_host_spec.rb +68 -0
  25. data/test_app/session/current_url_spec.rb +15 -0
  26. data/test_app/session/fill_in_spec.rb +125 -0
  27. data/test_app/session/find_button_spec.rb +18 -0
  28. data/test_app/session/find_by_id_spec.rb +18 -0
  29. data/test_app/session/find_field_spec.rb +26 -0
  30. data/test_app/session/find_link_spec.rb +19 -0
  31. data/test_app/session/find_spec.rb +149 -0
  32. data/test_app/session/first_spec.rb +105 -0
  33. data/test_app/session/has_button_spec.rb +32 -0
  34. data/test_app/session/has_content_spec.rb +106 -0
  35. data/test_app/session/has_css_spec.rb +243 -0
  36. data/test_app/session/has_field_spec.rb +192 -0
  37. data/test_app/session/has_link_spec.rb +37 -0
  38. data/test_app/session/has_select_spec.rb +129 -0
  39. data/test_app/session/has_selector_spec.rb +129 -0
  40. data/test_app/session/has_table_spec.rb +96 -0
  41. data/test_app/session/has_xpath_spec.rb +123 -0
  42. data/test_app/session/headers.rb +19 -0
  43. data/test_app/session/javascript.rb +289 -0
  44. data/test_app/session/response_code.rb +19 -0
  45. data/test_app/session/select_spec.rb +113 -0
  46. data/test_app/session/text_spec.rb +19 -0
  47. data/test_app/session/uncheck_spec.rb +21 -0
  48. data/test_app/session/unselect_spec.rb +61 -0
  49. data/test_app/session/within_spec.rb +178 -0
  50. data/test_app/session.rb +154 -0
  51. data/test_app/test_app.rb +142 -0
  52. data/test_app/views/buttons.erb +4 -0
  53. data/test_app/views/fieldsets.erb +29 -0
  54. data/test_app/views/form.erb +365 -0
  55. data/test_app/views/frame_one.erb +8 -0
  56. data/test_app/views/frame_two.erb +8 -0
  57. data/test_app/views/header_links.erb +7 -0
  58. data/test_app/views/host_links.erb +12 -0
  59. data/test_app/views/popup_one.erb +8 -0
  60. data/test_app/views/popup_two.erb +8 -0
  61. data/test_app/views/postback.erb +13 -0
  62. data/test_app/views/tables.erb +122 -0
  63. data/test_app/views/with_html.erb +74 -0
  64. data/test_app/views/with_html_entities.erb +1 -0
  65. data/test_app/views/with_js.erb +48 -0
  66. data/test_app/views/with_scope.erb +36 -0
  67. data/test_app/views/with_simple_html.erb +1 -0
  68. data/test_app/views/within_frames.erb +10 -0
  69. data/test_app/views/within_popups.erb +25 -0
  70. metadata +158 -0
@@ -0,0 +1,48 @@
1
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
4
+ <title>with_js</title>
5
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
6
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
7
+ <script src="/test.js" type="text/javascript" charset="utf-8"></script>
8
+ </head>
9
+
10
+ <body id="with_js">
11
+ <h1>FooBar</h1>
12
+
13
+ <p id="change">This is text</p>
14
+ <div id="drag">
15
+ <p>This is a draggable element.</p>
16
+ </div>
17
+ <div id="drop">
18
+ <p>It should be dropped here.</p>
19
+ </div>
20
+
21
+ <p><a href="#" id="clickable">Click me</a></p>
22
+
23
+ <p>
24
+ <select id="waiter">
25
+ <option>Foo</option>
26
+ <option>My Waiting Option</option>
27
+ </select>
28
+ </p>
29
+
30
+ <p>
31
+ <input type="text" name="with_focus_event" value="" id="with_focus_event"/>
32
+ </p>
33
+
34
+ <p>
35
+ <input type="checkbox" id="checkbox_with_event"/>
36
+ </p>
37
+
38
+ <p>
39
+ <input type="submit" id="fire_ajax_request" value="Fire Ajax Request"/>
40
+ </p>
41
+
42
+ <p>
43
+ <a id="reload-link" href="#">Reload!</a>
44
+ <div id="reload-me"><em>waiting to be reloaded</em></div>
45
+ </p>
46
+ </body>
47
+ </html>
48
+
@@ -0,0 +1,36 @@
1
+ <h1>This page is used for testing various scopes</h1>
2
+
3
+ <p id="for_foo">
4
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
5
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim venia.
6
+ <a href="/redirect">Go</a>
7
+ </p>
8
+
9
+ <div id="for_bar">
10
+ <ul>
11
+ <li>With Simple HTML: <a href="/with_simple_html">Go</a>
12
+ <form action="/redirect" method="post" accept-charset="utf-8">
13
+ <p>
14
+ <label for="simple_first_name">First Name</label>
15
+ <input type="text" name="first_name" value="John" id="simple_first_name"/>
16
+ </p>
17
+ <p><input type="submit" value="Go"/></p>
18
+ </form>
19
+ </li>
20
+ <li>Bar: <a href="/foo">Go</a>
21
+ <form action="/form" method="post" accept-charset="utf-8">
22
+ <p>
23
+ <label for="bar_first_name">First Name</label>
24
+ <input type="text" name="form[first_name]" value="Peter" id="bar_first_name"/>
25
+ </p>
26
+ <p><input type="submit" value="Go"/></p>
27
+ </form>
28
+ </li>
29
+ </ul>
30
+ </div>
31
+
32
+ <div id="another_foo">
33
+ <ul>
34
+ <li>With Simple HTML: <a href="/">Go</a>
35
+ </ul>
36
+ </div>
@@ -0,0 +1 @@
1
+ Bar
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <head>
3
+ <title>With Frames</title>
4
+ </head>
5
+ <body>
6
+ <div id="divInMainWindow">This is the text for divInMainWindow</div>
7
+ <iframe src="/frame_one" id="frameOne"></iframe>
8
+ <iframe src="/frame_two" id="frameTwo"></iframe>
9
+ </body>
10
+ </html>
@@ -0,0 +1,25 @@
1
+ <html>
2
+ <head>
3
+ <title>With Popups</title>
4
+ <script language="javascript" type="text/javascript">
5
+ <!--
6
+
7
+ function popItUp(name, url) {
8
+ newwindow=window.open(url,name,'height=200,width=150');
9
+ if (window.focus) { newwindow.focus() }
10
+ return false;
11
+ }
12
+
13
+ function init() {
14
+ popItUp('firstPopup', '/popup_one');
15
+ popItUp('secondPopup', '/popup_two');
16
+ }
17
+ window.onload = init;
18
+
19
+ // -->
20
+ </script>
21
+ </head>
22
+ <body>
23
+ <div id="divInMainWindow">This is the text for divInMainWindow</div>
24
+ </body>
25
+ </html>
metadata ADDED
@@ -0,0 +1,158 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capybara_minitest_spec
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Jared Ning
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-09-26 00:00:00 -05:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: capybara
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: "2.0"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: sinatra
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.9.4
47
+ type: :development
48
+ version_requirements: *id003
49
+ description: MiniTest::Spec expectations for Capybara node matchers.
50
+ email:
51
+ - jared@redningja.com
52
+ executables: []
53
+
54
+ extensions: []
55
+
56
+ extra_rdoc_files: []
57
+
58
+ files:
59
+ - .gemtest
60
+ - .gitignore
61
+ - .gitmodules
62
+ - .rvmrc
63
+ - Gemfile
64
+ - README.md
65
+ - Rakefile
66
+ - capybara_minitest_spec.gemspec
67
+ - lib/capybara_minitest_spec.rb
68
+ - lib/capybara_minitest_spec/version.rb
69
+ - test/matchers_spec.rb
70
+ - test/spec_helper.rb
71
+ - test_app/driver.rb
72
+ - test_app/fixtures/capybara.jpg
73
+ - test_app/fixtures/test_file.txt
74
+ - test_app/public/test.js
75
+ - test_app/session.rb
76
+ - test_app/session/all_spec.rb
77
+ - test_app/session/attach_file_spec.rb
78
+ - test_app/session/check_spec.rb
79
+ - test_app/session/choose_spec.rb
80
+ - test_app/session/click_button_spec.rb
81
+ - test_app/session/click_link_or_button_spec.rb
82
+ - test_app/session/click_link_spec.rb
83
+ - test_app/session/current_host_spec.rb
84
+ - test_app/session/current_url_spec.rb
85
+ - test_app/session/fill_in_spec.rb
86
+ - test_app/session/find_button_spec.rb
87
+ - test_app/session/find_by_id_spec.rb
88
+ - test_app/session/find_field_spec.rb
89
+ - test_app/session/find_link_spec.rb
90
+ - test_app/session/find_spec.rb
91
+ - test_app/session/first_spec.rb
92
+ - test_app/session/has_button_spec.rb
93
+ - test_app/session/has_content_spec.rb
94
+ - test_app/session/has_css_spec.rb
95
+ - test_app/session/has_field_spec.rb
96
+ - test_app/session/has_link_spec.rb
97
+ - test_app/session/has_select_spec.rb
98
+ - test_app/session/has_selector_spec.rb
99
+ - test_app/session/has_table_spec.rb
100
+ - test_app/session/has_xpath_spec.rb
101
+ - test_app/session/headers.rb
102
+ - test_app/session/javascript.rb
103
+ - test_app/session/response_code.rb
104
+ - test_app/session/select_spec.rb
105
+ - test_app/session/text_spec.rb
106
+ - test_app/session/uncheck_spec.rb
107
+ - test_app/session/unselect_spec.rb
108
+ - test_app/session/within_spec.rb
109
+ - test_app/test_app.rb
110
+ - test_app/views/buttons.erb
111
+ - test_app/views/fieldsets.erb
112
+ - test_app/views/form.erb
113
+ - test_app/views/frame_one.erb
114
+ - test_app/views/frame_two.erb
115
+ - test_app/views/header_links.erb
116
+ - test_app/views/host_links.erb
117
+ - test_app/views/popup_one.erb
118
+ - test_app/views/popup_two.erb
119
+ - test_app/views/postback.erb
120
+ - test_app/views/tables.erb
121
+ - test_app/views/with_html.erb
122
+ - test_app/views/with_html_entities.erb
123
+ - test_app/views/with_js.erb
124
+ - test_app/views/with_scope.erb
125
+ - test_app/views/with_simple_html.erb
126
+ - test_app/views/within_frames.erb
127
+ - test_app/views/within_popups.erb
128
+ has_rdoc: true
129
+ homepage: ""
130
+ licenses: []
131
+
132
+ post_install_message:
133
+ rdoc_options: []
134
+
135
+ require_paths:
136
+ - lib
137
+ required_ruby_version: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: "0"
143
+ required_rubygems_version: !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: "0"
149
+ requirements: []
150
+
151
+ rubyforge_project: capybara_minitest_spec
152
+ rubygems_version: 1.6.1
153
+ signing_key:
154
+ specification_version: 3
155
+ summary: MiniTest::Spec expectations for Capybara node matchers.
156
+ test_files:
157
+ - test/matchers_spec.rb
158
+ - test/spec_helper.rb