mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
Add working test
This commit is contained in:
parent
758dfda988
commit
bb08000f1e
7 changed files with 30 additions and 7 deletions
|
@ -11,7 +11,7 @@ PUMA_PORT=4000
|
||||||
PUMA_TIMEOUT=30
|
PUMA_TIMEOUT=30
|
||||||
|
|
||||||
MYSQL_HOST=db
|
MYSQL_HOST=db
|
||||||
MYSQL_DATABASE=ensl
|
MYSQL_DATABASE=ensl_test
|
||||||
MYSQL_USERNAME=ensl
|
MYSQL_USERNAME=ensl
|
||||||
MYSQL_PASSWORD=ensl
|
MYSQL_PASSWORD=ensl
|
||||||
MYSQL_ROOT_PASSWORD=ensl
|
MYSQL_ROOT_PASSWORD=ensl
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,6 +16,7 @@
|
||||||
db_data*
|
db_data*
|
||||||
db_data/*
|
db_data/*
|
||||||
!db_data/.placeholder
|
!db_data/.placeholder
|
||||||
|
*.sql
|
||||||
|
|
||||||
# OS X
|
# OS X
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
1
Gemfile
1
Gemfile
|
@ -67,6 +67,7 @@ group :test do
|
||||||
gem 'selenium-webdriver', '~> 2.47.1'
|
gem 'selenium-webdriver', '~> 2.47.1'
|
||||||
gem 'factory_girl_rails', '~> 4.4.1'
|
gem 'factory_girl_rails', '~> 4.4.1'
|
||||||
gem 'timecop', '~> 0.7.1'
|
gem 'timecop', '~> 0.7.1'
|
||||||
|
gem 'rspec'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
|
|
@ -214,6 +214,10 @@ GEM
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
ref (2.0.0)
|
ref (2.0.0)
|
||||||
rmagick (2.13.4)
|
rmagick (2.13.4)
|
||||||
|
rspec (3.3.0)
|
||||||
|
rspec-core (~> 3.3.0)
|
||||||
|
rspec-expectations (~> 3.3.0)
|
||||||
|
rspec-mocks (~> 3.3.0)
|
||||||
rspec-core (3.3.2)
|
rspec-core (3.3.2)
|
||||||
rspec-support (~> 3.3.0)
|
rspec-support (~> 3.3.0)
|
||||||
rspec-expectations (3.3.1)
|
rspec-expectations (3.3.1)
|
||||||
|
@ -338,6 +342,7 @@ DEPENDENCIES
|
||||||
rails (~> 4.1.16)
|
rails (~> 4.1.16)
|
||||||
rails_autolink (~> 1.1.5)
|
rails_autolink (~> 1.1.5)
|
||||||
rmagick (~> 2.13.4)
|
rmagick (~> 2.13.4)
|
||||||
|
rspec
|
||||||
rspec-rails (~> 3.3.3)
|
rspec-rails (~> 3.3.3)
|
||||||
sanitize (~> 2.1.0)
|
sanitize (~> 2.1.0)
|
||||||
sass-rails (~> 5.0.3)
|
sass-rails (~> 5.0.3)
|
||||||
|
|
|
@ -25,12 +25,12 @@ services:
|
||||||
- "./db_data:/var/lib/mysql"
|
- "./db_data:/var/lib/mysql"
|
||||||
- "./ext/mysql.conf.d:/etc/mysql/conf.d"
|
- "./ext/mysql.conf.d:/etc/mysql/conf.d"
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE
|
- MYSQL_DATABASE=ensl
|
||||||
- MYSQL_USER
|
- MYSQL_USER=ensl
|
||||||
- MYSQL_USERNAME
|
- MYSQL_USERNAME=ensl
|
||||||
- MYSQL_PASSWORD
|
- MYSQL_PASSWORD=ensl
|
||||||
- MYSQL_ROOT_PASSWORD
|
- MYSQL_ROOT_PASSWORD=ensl
|
||||||
- MYSQL_ROOT_HOST
|
- MYSQL_ROOT_HOST=%
|
||||||
memcached:
|
memcached:
|
||||||
image: memcached:latest
|
image: memcached:latest
|
||||||
#redis:
|
#redis:
|
||||||
|
|
8
spec/controllers/articles_controller_spec.rb
Normal file
8
spec/controllers/articles_controller_spec.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe ArticlesController, type: :controller do
|
||||||
|
it "renders the index template" do
|
||||||
|
get :index
|
||||||
|
expect(response).to render_template("index")
|
||||||
|
end
|
||||||
|
end
|
8
spec/controllers/shoutmsgs_controller_spec.rb
Normal file
8
spec/controllers/shoutmsgs_controller_spec.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe ShoutmsgsController, type: :controller do
|
||||||
|
it "renders the index template" do
|
||||||
|
get :index
|
||||||
|
expect(response).to render_template("index")
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue