Commit 8f2effc2 authored by Cool Fire's avatar Cool Fire

Update tests

parent c32cc69f
Pipeline #318 failed with stages
in 1 minute and 7 seconds
......@@ -11,7 +11,7 @@ syntax_ruby:
- find . -name '*\.rb' -exec bash -c 'echo -ne "{}\t\t\t" && ruby -c {}' \;
syntax_erb:
stage: syntax
image: ruyb:2.4
image: ruby:2.4
script:
- find . -name '*\.erb' -exec bash -c 'echo -ne "{}\t\t\t" && erb -P -x {} | ruby -c' \;
lint_ruby:
......@@ -30,8 +30,9 @@ tests:
stage: testing
image: ruby:2.4
script:
- gem install rack-test --no-ri --no-rdoc
- bundle install
- rake test
- ruby test.rb
deploy:
stage: deploy
image: ubuntu:16.04
......
# frozen_string_literal: true
require File.expand_path '../test_helper.rb', __FILE__
include Rack::Test::Methods
def app
SignupSite
end
describe 'SignupSite main page' do
it 'should return HTML' do
get '/'
last_response.body.must_include '<!DOCTYPE html>'
end
it 'should return the landing page' do
get '/'
last_response.body.must_include 'test'
end
end
# frozen_string_literal: true
ENV['RACK_ENV'] = 'test'
require 'minitest/autorun'
require 'rack/test'
require File.expand_path '../signup_site.rb', __FILE__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment