Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-static
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-static
Commits
d1fc57e3
Commit
d1fc57e3
authored
Jun 03, 2015
by
Terence Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add custom route test
parent
0c7f7f53
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
index.html
spec/fixtures/routes/public_html/index.html
+1
-0
route.html
spec/fixtures/routes/public_html/route.html
+1
-0
static.json
spec/fixtures/routes/static.json
+6
-0
simple_spec.rb
spec/simple_spec.rb
+18
-0
No files found.
spec/fixtures/routes/public_html/index.html
0 → 100644
View file @
d1fc57e3
hello world
spec/fixtures/routes/public_html/route.html
0 → 100644
View file @
d1fc57e3
hello from route
spec/fixtures/routes/static.json
0 → 100644
View file @
d1fc57e3
{
"routes"
:
{
"/*.html"
:
"index.html"
,
"/route/**"
:
"route.html"
}
}
spec/simple_spec.rb
View file @
d1fc57e3
...
...
@@ -41,4 +41,22 @@ describe "Simple" do
expect
(
response
.
body
.
chomp
).
to
eq
(
"foobar"
)
end
end
describe
"routes"
do
let
(
:name
)
{
"routes"
}
it
"should support custom routes"
do
response
=
app
.
get
(
"/foo.html"
)
expect
(
response
.
code
).
to
eq
(
"200"
)
expect
(
response
.
body
.
chomp
).
to
eq
(
"hello world"
)
response
=
app
.
get
(
"/route/foo"
)
expect
(
response
.
code
).
to
eq
(
"200"
)
expect
(
response
.
body
.
chomp
).
to
eq
(
"hello from route"
)
response
=
app
.
get
(
"/route/foo/bar"
)
expect
(
response
.
code
).
to
eq
(
"200"
)
expect
(
response
.
body
.
chomp
).
to
eq
(
"hello from route"
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment