rails_sandbox_server 0.0.2
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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +32 -0
- data/app/controllers/rails_sandbox_server/sandbox_controller.rb +49 -0
- data/config/routes.rb +5 -0
- data/lib/rails_sandbox_server/engine.rb +5 -0
- data/lib/rails_sandbox_server/version.rb +3 -0
- data/lib/rails_sandbox_server.rb +18 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/articles.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/assets/stylesheets/articles.css +4 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/articles_controller.rb +59 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/articles_helper.rb +2 -0
- data/test/dummy/app/models/article.rb +2 -0
- data/test/dummy/app/views/articles/_form.html.erb +25 -0
- data/test/dummy/app/views/articles/edit.html.erb +6 -0
- data/test/dummy/app/views/articles/index.html.erb +27 -0
- data/test/dummy/app/views/articles/new.html.erb +5 -0
- data/test/dummy/app/views/articles/show.html.erb +14 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +39 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +59 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150314042338_create_articles.rb +10 -0
- data/test/dummy/db/schema.rb +23 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +279 -0
- data/test/dummy/log/test.log +5865 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/another_fixtures/another_articles.yml +7 -0
- data/test/dummy/test/another_fixtures/articles.yml +7 -0
- data/test/dummy/test/controllers/articles_controller_test.rb +51 -0
- data/test/dummy/test/fixtures/articles.yml +9 -0
- data/test/dummy/test/helpers/articles_helper_test.rb +4 -0
- data/test/dummy/test/models/article_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/2Me4STLJD3IHURApjrU2rLfgYDNFlhQ60_nDx618xmQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5jwebbiF9udpdRrZ_csV4FaqHzTUC2oQEAoFaHLs7aw.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/BSiMxNeGTC692zobwmuMlxnswPnCNTnh9HXubPMMpjc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/BWP7t3k4_i_YuxmI4s7hGy7oglEabhM0Jh71eB_JiOU.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Cvp9yl21BXjS24i-d7y0zoSJrXt26nkQm7hiarCnWk8.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/DmmfrCpXtt74Hr6NO54lxyOCDv6klnDyBqeDFR7oDU8.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/F4WepConqOMhTaXGZf2BJmZ64W8xLWXrM-yD8MB1Mmc.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/FURGai1z5y__38P8KYHKjgyZll5PmJKfXgXgoofiAqA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Gn5TuU1oBSqLRKrAnOoZQJbSZKyqBqp5QhFwUe2Sz0k.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/JLV9iEsUhtcVIB3ggp9F0L1sXevvcZeuM5Q3ANf0F_Q.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/KDE-uoUuTQlyxEGvrCOa58gjMWRcDPjHCQJklD8DOtw.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/O8akbUwAbmIKY-AhITimq-JDQ6IgsO3Hvq2v5etufFw.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XiSHuRE8cwpZAgu-LoQFIGrTkgs8C7ky6xNFswfItL4.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Z53ErphZfpF7s92LlVuhjcHQB_PnK5ibuXK_3KNZsco.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/bPW9oPgt58Je-SSd2XgVWJwo8zWC_RL55csjCu5TJtA.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/dphXxQV1ZyMzvKy0tXw9loofG0G8_4MC_ZXSE_eHnFI.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/eISuf5WKUmPtF28HVt1UsCxtn8rMrNECb_cIKIi2mo0.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hC-LoD1APW_071bOOPCjyD_WWcMwwOtTXxzmmACgjN4.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ivyNPf79WhlMN1XjjETEt_5gWv6DzKs_gtbX9g241D4.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/mP7zUIJou6_enWuNvrwLqWdQE2XiEDHgMSdGptLBcQo.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/n0OkXugoqdLIv52_xrb4z7Mp8JfUFcRrM28ausBM0Lc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tPF6H9NRpGO3whu2y5_e_R_1EACKdCwu5437D83qJT0.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tpWsWpomFXXRhgW8piH0yQxqOEqnnT6or_qw4deuFQY.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ueUKzEuwfsdekdLse17KFuIJS2k1SubogYoMtLyU7YA.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vLLEqh7xR1YgUwwzKlHZ3GQ5SjvG036PVwiOwLtI6P8.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/wG_whueNWUbRh4wvgMhX2f7EtoDSqX1y_OwF9RgjLvc.cache +2 -0
- data/test/rails_sandbox_server_test.rb +7 -0
- data/test/sandbox_controller_test.rb +20 -0
- data/test/test_helper.rb +18 -0
- metadata +267 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ArticlesControllerTest < ActionController::TestCase
|
4
|
+
fixtures :articles
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@article = articles(:one)
|
8
|
+
end
|
9
|
+
|
10
|
+
test "should get index" do
|
11
|
+
get :index
|
12
|
+
assert_response :success
|
13
|
+
assert_not_nil assigns(:articles)
|
14
|
+
end
|
15
|
+
|
16
|
+
test "should get new" do
|
17
|
+
get :new
|
18
|
+
assert_response :success
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should create article" do
|
22
|
+
assert_difference('Article.count') do
|
23
|
+
post :create, article: { content: @article.content, title: @article.title }
|
24
|
+
end
|
25
|
+
|
26
|
+
assert_redirected_to article_path(assigns(:article))
|
27
|
+
end
|
28
|
+
|
29
|
+
test "should show article" do
|
30
|
+
get :show, id: @article
|
31
|
+
assert_response :success
|
32
|
+
end
|
33
|
+
|
34
|
+
test "should get edit" do
|
35
|
+
get :edit, id: @article
|
36
|
+
assert_response :success
|
37
|
+
end
|
38
|
+
|
39
|
+
test "should update article" do
|
40
|
+
patch :update, id: @article, article: { content: @article.content, title: @article.title }
|
41
|
+
assert_redirected_to article_path(assigns(:article))
|
42
|
+
end
|
43
|
+
|
44
|
+
test "should destroy article" do
|
45
|
+
assert_difference('Article.count', -1) do
|
46
|
+
delete :destroy, id: @article
|
47
|
+
end
|
48
|
+
|
49
|
+
assert_redirected_to articles_path
|
50
|
+
end
|
51
|
+
end
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/stylesheets/scaffold.css?type=text/css&pipeline=self&id=578edb18417610d8d0e161c03dc33addc4396095983553009c30ff61264b6da4:ET
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
"%֧�NTZq�בH�L��#p3��Jg!��)
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=eef2f4202d8bea3ff8a2a7cb8c17e4ba1891b941931ccb8dde59237886dab956:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/javascripts/application.js?type=application/javascript&id=18ed48d9d2b647aa5c496d27f2ecafbac35cf005fc13fddf0eea067a90b4bab2:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
I"}app/assets/stylesheets/application.css?type=text/css&id=2e9227c7010cfe67ff59eeead1b86946522ef6a07658b25c9b4959580e7f07d9:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%]!�K��X�K�֓�ޖ���';�����4x��
|
Binary file
|
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash{I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI")file-digest://app/assets/javascripts;TTI"5file-digest://app/assets/javascripts/articles.js;TT
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/stylesheets/articles.css?type=text/css&pipeline=self&id=e5b2bccb333d31195d76d8f0315ca8236d9cce5e46e98f595397ebe9cd51baad:ET
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/javascripts/articles.js?type=application/javascript&pipeline=self&id=fb7062865b6601dbab5d7ce5ab5ba5d4062f8d3a7d05fc40734a2852bed44c5a:ET
|
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash{I"environment-version:ETTI"environment-paths;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"5file-digest://app/assets/javascripts/articles.js;TTI")file-digest://app/assets/javascripts;TT
|
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash{I"environment-version:ETTI"environment-paths;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TTI"6file-digest://app/assets/stylesheets/articles.css;TTI"6file-digest://app/assets/stylesheets/scaffold.css;TT
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=5382ba8946013aef44df818f432c080a3dcc7a1bd14110b985ab1dce78e864d0:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%��A�I8���߅�u7�!��H���j���\��|x
|
@@ -0,0 +1 @@
|
|
1
|
+
"%p1�_�����"��!X��ͱȄ���[D�
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module RailsSandboxServer
|
4
|
+
class SandboxControllerTest < ActionController::TestCase
|
5
|
+
|
6
|
+
test "should load fixture" do
|
7
|
+
post :setup, fixture: 'articles', fixtures_dir: Rails.root.join('test/another_fixtures')
|
8
|
+
|
9
|
+
assert_response :success
|
10
|
+
end
|
11
|
+
|
12
|
+
test "should rollback" do
|
13
|
+
post :setup, fixture: 'articles'
|
14
|
+
assert_response :success
|
15
|
+
|
16
|
+
get :rollback
|
17
|
+
assert_response :success
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
+
require "rails/test_help"
|
7
|
+
|
8
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
+
# to be shown.
|
10
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
11
|
+
|
12
|
+
# Load support files
|
13
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
14
|
+
|
15
|
+
# Load fixtures from the engine
|
16
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
17
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
+
end
|