Skip to content

Commit d294837

Browse files
Add basic testing suite
1 parent 2ecd852 commit d294837

File tree

13 files changed

+48
-6
lines changed

13 files changed

+48
-6
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ group :development, :test do
77
gem 'byebug', platform: [:ruby], require: false
88
gem 'rubocop', require: false
99
gem 'rspec-rails', '~> 3.6'
10+
gem 'capybara', '~> 2.16'
11+
gem 'pry-rails'
1012
end
1113

1214
# HACK: npm install on bundle

app_container_name

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
criticalpathcss_ruby

config.ru

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'rubygems'
22
require 'bundler'
3+
require 'combustion'
34

4-
Bundler.require :default, :development
5-
6-
Combustion.initialize! :all
5+
Combustion.initialize! :action_controller, :action_view
76
run Combustion::Application

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ services:
44
build:
55
context: .
66
dockerfile: docker/ruby/Dockerfile
7+
ports:
8+
- 9292:9292
79
volumes:
810
- .:/app:rw
911
volumes_from:
1012
- data
1113
env_file: docker/ruby/.env
1214
container_name: criticalpathcss_ruby
13-
1415
data:
1516
build:
1617
context: .

docker/ruby/startup.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
bundle check || bundle install
44

5-
tail -f /dev/null
5+
bundle exec rackup --host 0.0.0.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class RootController < ActionController::Base
2+
def index; end
3+
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<html>
2+
<head></head>
3+
<body><%= yield %></body>
4+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p><%= CriticalPathCss.fetch(request.path) %></p>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defaults: &defaults
2+
base_url: http://0.0.0.0:9292
3+
css_path: /test.css
4+
routes:
5+
- /
6+
7+
development:
8+
<<: *defaults
9+
10+
test:
11+
<<: *defaults

spec/internal/config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Rails.application.routes.draw do
2-
#
2+
root 'root#index'
33
end

0 commit comments

Comments
 (0)