forked from hotsh/rstat.us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1f56cd
commit 133b3cd
Showing
6 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
source "http://rubygems.org" | ||
|
||
gem "sinatra" | ||
|
||
group :development, :test do | ||
|
||
gem 'rack-test' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require 'rake/testtask' | ||
Rake::TestTask.new do |t| | ||
t.pattern = "test/*_test.rb" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
require "rubygems" | ||
require 'bundler' | ||
Bundler.setup | ||
|
||
require 'sinatra/base' | ||
|
||
class Rstatus < Sinatra::Base | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require_relative 'test_helper' | ||
|
||
class RstatusTest < MiniTest::Unit::TestCase | ||
|
||
include Rack::Test::Methods | ||
|
||
def app() Rstatus end | ||
|
||
def test_hello_world | ||
get '/' | ||
assert last_response.ok? | ||
assert_equal "Hello, world!", last_response.body | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ENV['RACK_ENV'] = 'test' | ||
require 'minitest/autorun' | ||
require 'rack/test' | ||
|
||
require_relative '../rstatus' | ||
|