capybara_minitest_spec 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rvmrc +1 -1
- data/.travis.yml +1 -1
- data/LICENSE.txt +22 -0
- data/README.md +6 -1
- data/capybara_minitest_spec.gemspec +1 -0
- data/lib/capybara_minitest_spec/version.rb +1 -1
- data/spec/capybara_rspec_matchers.spec.rb +159 -48
- data/spec/helper.rb +1 -33
- metadata +20 -69
- data/.gemtest +0 -0
- data/spec/test_app/test_app.rb +0 -146
- data/spec/test_app/views/buttons.erb +0 -4
- data/spec/test_app/views/fieldsets.erb +0 -29
- data/spec/test_app/views/form.erb +0 -365
- data/spec/test_app/views/frame_one.erb +0 -8
- data/spec/test_app/views/frame_two.erb +0 -8
- data/spec/test_app/views/header_links.erb +0 -7
- data/spec/test_app/views/host_links.erb +0 -12
- data/spec/test_app/views/popup_one.erb +0 -8
- data/spec/test_app/views/popup_two.erb +0 -8
- data/spec/test_app/views/postback.erb +0 -13
- data/spec/test_app/views/tables.erb +0 -122
- data/spec/test_app/views/with_html.erb +0 -74
- data/spec/test_app/views/with_html_entities.erb +0 -1
- data/spec/test_app/views/with_js.erb +0 -48
- data/spec/test_app/views/with_scope.erb +0 -36
- data/spec/test_app/views/with_simple_html.erb +0 -1
- data/spec/test_app/views/within_frames.erb +0 -10
- data/spec/test_app/views/within_popups.erb +0 -25
metadata
CHANGED
@@ -1,94 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara_minitest_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jared Ning
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-10-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: capybara
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '2'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '2'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: minitest
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '2'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '2'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: awesome_print
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rake
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: sinatra
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: 0.9.4
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: 0.9.4
|
94
83
|
description: Use Capybara matchers with MiniTest. Specifically, it defines MiniTest::Spec
|
@@ -99,13 +88,13 @@ executables: []
|
|
99
88
|
extensions: []
|
100
89
|
extra_rdoc_files: []
|
101
90
|
files:
|
102
|
-
- .gemtest
|
103
91
|
- .gitignore
|
104
92
|
- .gitmodules
|
105
93
|
- .rvmrc
|
106
94
|
- .travis.yml
|
107
95
|
- Gemfile
|
108
96
|
- HISTORY.md
|
97
|
+
- LICENSE.txt
|
109
98
|
- README.md
|
110
99
|
- Rakefile
|
111
100
|
- capybara_minitest_spec.gemspec
|
@@ -115,71 +104,33 @@ files:
|
|
115
104
|
- spec/capybara_minitest_spec.spec.rb
|
116
105
|
- spec/capybara_rspec_matchers.spec.rb
|
117
106
|
- spec/helper.rb
|
118
|
-
- spec/test_app/test_app.rb
|
119
|
-
- spec/test_app/views/buttons.erb
|
120
|
-
- spec/test_app/views/fieldsets.erb
|
121
|
-
- spec/test_app/views/form.erb
|
122
|
-
- spec/test_app/views/frame_one.erb
|
123
|
-
- spec/test_app/views/frame_two.erb
|
124
|
-
- spec/test_app/views/header_links.erb
|
125
|
-
- spec/test_app/views/host_links.erb
|
126
|
-
- spec/test_app/views/popup_one.erb
|
127
|
-
- spec/test_app/views/popup_two.erb
|
128
|
-
- spec/test_app/views/postback.erb
|
129
|
-
- spec/test_app/views/tables.erb
|
130
|
-
- spec/test_app/views/with_html.erb
|
131
|
-
- spec/test_app/views/with_html_entities.erb
|
132
|
-
- spec/test_app/views/with_js.erb
|
133
|
-
- spec/test_app/views/with_scope.erb
|
134
|
-
- spec/test_app/views/with_simple_html.erb
|
135
|
-
- spec/test_app/views/within_frames.erb
|
136
|
-
- spec/test_app/views/within_popups.erb
|
137
107
|
- spec/test_name.spec.rb
|
138
108
|
homepage: https://github.com/ordinaryzelig/capybara_minitest_spec
|
139
|
-
licenses:
|
109
|
+
licenses:
|
110
|
+
- MIT
|
111
|
+
metadata: {}
|
140
112
|
post_install_message:
|
141
113
|
rdoc_options: []
|
142
114
|
require_paths:
|
143
115
|
- lib
|
144
116
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
117
|
requirements:
|
147
|
-
- -
|
118
|
+
- - '>='
|
148
119
|
- !ruby/object:Gem::Version
|
149
120
|
version: '0'
|
150
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
|
-
none: false
|
152
122
|
requirements:
|
153
|
-
- -
|
123
|
+
- - '>='
|
154
124
|
- !ruby/object:Gem::Version
|
155
125
|
version: '0'
|
156
126
|
requirements: []
|
157
127
|
rubyforge_project: capybara_minitest_spec
|
158
|
-
rubygems_version:
|
128
|
+
rubygems_version: 2.0.0
|
159
129
|
signing_key:
|
160
|
-
specification_version:
|
130
|
+
specification_version: 4
|
161
131
|
summary: Capybara + MiniTest::Spec
|
162
132
|
test_files:
|
163
133
|
- spec/capybara_minitest_spec.spec.rb
|
164
134
|
- spec/capybara_rspec_matchers.spec.rb
|
165
135
|
- spec/helper.rb
|
166
|
-
- spec/test_app/test_app.rb
|
167
|
-
- spec/test_app/views/buttons.erb
|
168
|
-
- spec/test_app/views/fieldsets.erb
|
169
|
-
- spec/test_app/views/form.erb
|
170
|
-
- spec/test_app/views/frame_one.erb
|
171
|
-
- spec/test_app/views/frame_two.erb
|
172
|
-
- spec/test_app/views/header_links.erb
|
173
|
-
- spec/test_app/views/host_links.erb
|
174
|
-
- spec/test_app/views/popup_one.erb
|
175
|
-
- spec/test_app/views/popup_two.erb
|
176
|
-
- spec/test_app/views/postback.erb
|
177
|
-
- spec/test_app/views/tables.erb
|
178
|
-
- spec/test_app/views/with_html.erb
|
179
|
-
- spec/test_app/views/with_html_entities.erb
|
180
|
-
- spec/test_app/views/with_js.erb
|
181
|
-
- spec/test_app/views/with_scope.erb
|
182
|
-
- spec/test_app/views/with_simple_html.erb
|
183
|
-
- spec/test_app/views/within_frames.erb
|
184
|
-
- spec/test_app/views/within_popups.erb
|
185
136
|
- spec/test_name.spec.rb
|
data/.gemtest
DELETED
File without changes
|
data/spec/test_app/test_app.rb
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
require 'sinatra/base'
|
2
|
-
require 'rack'
|
3
|
-
require 'yaml'
|
4
|
-
|
5
|
-
class TestApp < Sinatra::Base
|
6
|
-
set :root, File.dirname(__FILE__)
|
7
|
-
set :static, true
|
8
|
-
|
9
|
-
get '/flash_message' do
|
10
|
-
'<div id="flash">Barry Allen</div>'
|
11
|
-
end
|
12
|
-
|
13
|
-
get '/' do
|
14
|
-
'Hello world! <a href="with_html">Relative</a>'
|
15
|
-
end
|
16
|
-
|
17
|
-
get '/foo' do
|
18
|
-
'Another World'
|
19
|
-
end
|
20
|
-
|
21
|
-
get '/redirect' do
|
22
|
-
redirect '/redirect_again'
|
23
|
-
end
|
24
|
-
|
25
|
-
get '/redirect_again' do
|
26
|
-
redirect '/landed'
|
27
|
-
end
|
28
|
-
|
29
|
-
get '/host' do
|
30
|
-
"Current host is #{request.scheme}://#{request.host}"
|
31
|
-
end
|
32
|
-
|
33
|
-
get '/redirect/:times/times' do
|
34
|
-
times = params[:times].to_i
|
35
|
-
if times.zero?
|
36
|
-
"redirection complete"
|
37
|
-
else
|
38
|
-
redirect "/redirect/#{times - 1}/times"
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
get '/landed' do
|
43
|
-
"You landed"
|
44
|
-
end
|
45
|
-
|
46
|
-
get '/with-quotes' do
|
47
|
-
%q{"No," he said, "you can't do that."}
|
48
|
-
end
|
49
|
-
|
50
|
-
get '/form/get' do
|
51
|
-
'<pre id="results">' + params[:form].to_yaml + '</pre>'
|
52
|
-
end
|
53
|
-
|
54
|
-
post '/relative' do
|
55
|
-
'<pre id="results">' + params[:form].to_yaml + '</pre>'
|
56
|
-
end
|
57
|
-
|
58
|
-
get '/favicon.ico' do
|
59
|
-
nil
|
60
|
-
end
|
61
|
-
|
62
|
-
post '/redirect' do
|
63
|
-
redirect '/redirect_again'
|
64
|
-
end
|
65
|
-
|
66
|
-
delete "/delete" do
|
67
|
-
"The requested object was deleted"
|
68
|
-
end
|
69
|
-
|
70
|
-
get "/delete" do
|
71
|
-
"Not deleted"
|
72
|
-
end
|
73
|
-
|
74
|
-
get '/redirect_back' do
|
75
|
-
redirect back
|
76
|
-
end
|
77
|
-
|
78
|
-
get '/redirect_secure' do
|
79
|
-
redirect "https://#{request.host}/host"
|
80
|
-
end
|
81
|
-
|
82
|
-
get '/slow_response' do
|
83
|
-
sleep 2
|
84
|
-
'Finally!'
|
85
|
-
end
|
86
|
-
|
87
|
-
get '/set_cookie' do
|
88
|
-
cookie_value = 'test_cookie'
|
89
|
-
response.set_cookie('capybara', cookie_value)
|
90
|
-
"Cookie set to #{cookie_value}"
|
91
|
-
end
|
92
|
-
|
93
|
-
get '/get_cookie' do
|
94
|
-
request.cookies['capybara']
|
95
|
-
end
|
96
|
-
|
97
|
-
get '/get_header' do
|
98
|
-
env['HTTP_FOO']
|
99
|
-
end
|
100
|
-
|
101
|
-
get '/get_header_via_redirect' do
|
102
|
-
redirect '/get_header'
|
103
|
-
end
|
104
|
-
|
105
|
-
get '/:view' do |view|
|
106
|
-
erb view.to_sym
|
107
|
-
end
|
108
|
-
|
109
|
-
post '/form' do
|
110
|
-
'<pre id="results">' + params[:form].to_yaml + '</pre>'
|
111
|
-
end
|
112
|
-
|
113
|
-
post '/upload_empty' do
|
114
|
-
if params[:form][:file].nil?
|
115
|
-
'Successfully ignored empty file field.'
|
116
|
-
else
|
117
|
-
'Something went wrong.'
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
post '/upload' do
|
122
|
-
begin
|
123
|
-
buffer = []
|
124
|
-
buffer << "Content-type: #{params[:form][:document][:type]}"
|
125
|
-
buffer << "File content: #{params[:form][:document][:tempfile].read}"
|
126
|
-
buffer.join(' | ')
|
127
|
-
rescue
|
128
|
-
'No file uploaded'
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
post '/upload_multiple' do
|
133
|
-
begin
|
134
|
-
buffer = []
|
135
|
-
buffer << "Content-type: #{params[:form][:multiple_documents][0][:type]}"
|
136
|
-
buffer << "File content: #{params[:form][:multiple_documents][0][:tempfile].read}"
|
137
|
-
buffer.join(' | ')
|
138
|
-
rescue
|
139
|
-
'No files uploaded'
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
if __FILE__ == $0
|
145
|
-
Rack::Handler::WEBrick.run TestApp, :Port => 8070
|
146
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<form action="/form" method="post">
|
2
|
-
<fieldset id="agent_fieldset">
|
3
|
-
<legend>Agent</legend>
|
4
|
-
|
5
|
-
<p>
|
6
|
-
<label for="form_agent_name">Name</label>
|
7
|
-
<input type="text" name="form[agent_name]" value="James" id="form_agent_name"/>
|
8
|
-
</p>
|
9
|
-
|
10
|
-
<p>
|
11
|
-
<input type="submit" value="Create"/>
|
12
|
-
</p>
|
13
|
-
</fieldset>
|
14
|
-
</form>
|
15
|
-
|
16
|
-
<form action="/form" method="post">
|
17
|
-
<fieldset id="villain_fieldset">
|
18
|
-
<legend>Villain</legend>
|
19
|
-
|
20
|
-
<p>
|
21
|
-
<label for="form_villain_name">Name</label>
|
22
|
-
<input type="text" name="form[villain_name]" value="Ernst" id="form_villain_name"/>
|
23
|
-
</p>
|
24
|
-
|
25
|
-
<p>
|
26
|
-
<input type="submit" value="Create"/>
|
27
|
-
</p>
|
28
|
-
</fieldset>
|
29
|
-
</form>
|