Skip to content
Snippets Groups Projects
Commit 81748798 authored by iaibrys's avatar iaibrys
Browse files

Fix test issues.

parent 1040ef06
No related branches found
No related tags found
No related merge requests found
Pipeline #347 passed
......@@ -69,8 +69,10 @@ end
group :test do
gem 'database_cleaner'
gem 'fakefs', require: 'fakefs/safe'
gem 'fakeredis', '~> 0.6.0', require: 'fakeredis/rspec'
#gem 'fakefs', git: '/Users/iain/Projects/enote/dtu-enote-installer/src/fakefs', branch: 'fix', require: 'fakefs/safe'
#gem 'fakefs', '~> 0.2', require: 'fakefs/safe'
gem 'fakefs', git: 'https://github.com/iainbryson/fakefs', branch: 'fix', require: 'fakefs/safe'
gem 'fakeredis', '~> 0.7', require: 'fakeredis/rspec'
end
gem 'rubycas-client', '~> 2.3.8', git: 'https://github.com/rubycas/rubycas-client'
......
GIT
remote: https://github.com/iainbryson/fakefs
revision: a95feb1a38661fb388077e8a65f92670fe76366e
branch: fix
specs:
fakefs (0.20.0)
GIT
remote: https://github.com/rubycas/rubycas-client
revision: 7b67c8f1b5515ee4e28479d640d2da0a5aadfbe0
......@@ -23,39 +30,39 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.6.1)
actionpack (= 5.1.6.1)
actioncable (5.1.7)
actionpack (= 5.1.7)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.6.1)
actionpack (= 5.1.6.1)
actionview (= 5.1.6.1)
activejob (= 5.1.6.1)
actionmailer (5.1.7)
actionpack (= 5.1.7)
actionview (= 5.1.7)
activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.6.1)
actionview (= 5.1.6.1)
activesupport (= 5.1.6.1)
actionpack (5.1.7)
actionview (= 5.1.7)
activesupport (= 5.1.7)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.6.1)
activesupport (= 5.1.6.1)
actionview (5.1.7)
activesupport (= 5.1.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.6.1)
activesupport (= 5.1.6.1)
activejob (5.1.7)
activesupport (= 5.1.7)
globalid (>= 0.3.6)
activemodel (5.1.6.1)
activesupport (= 5.1.6.1)
activerecord (5.1.6.1)
activemodel (= 5.1.6.1)
activesupport (= 5.1.6.1)
activemodel (5.1.7)
activesupport (= 5.1.7)
activerecord (5.1.7)
activemodel (= 5.1.7)
activesupport (= 5.1.7)
arel (~> 8.0)
activesupport (5.1.6.1)
activesupport (5.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
......@@ -65,10 +72,10 @@ GEM
arel (8.0.0)
ast (2.4.0)
awesome_print (1.8.0)
bindex (0.5.0)
bindex (0.7.0)
bower-rails (0.11.0)
builder (3.2.3)
capybara (3.13.2)
capybara (3.18.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
......@@ -97,12 +104,11 @@ GEM
erubi (1.8.0)
eventmachine (1.2.7)
execjs (2.7.0)
fakefs (0.19.2)
fakeredis (0.6.0)
redis (~> 3.2)
fakeredis (0.7.0)
redis (>= 3.2, < 5.0)
ffi (1.10.0)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
foreman (0.84.0)
thor (~> 0.19.1)
formatador (0.2.5)
......@@ -154,7 +160,7 @@ GEM
listen (3.1.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
lograge (0.10.0)
lograge (0.11.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
......@@ -170,7 +176,7 @@ GEM
micro_magick (1.1.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mime-types-data (3.2019.0331)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
minitest (5.11.3)
......@@ -183,34 +189,32 @@ GEM
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.13.0)
parser (2.6.0.0)
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
powerpack (0.1.2)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
psych (3.1.0)
public_suffix (3.0.3)
rack (2.0.7)
rack-cache (1.8.0)
rack-cache (1.9.0)
rack (>= 0.4)
rack-proxy (0.6.5)
rack
rack-rewrite (1.5.1)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.6.1)
actioncable (= 5.1.6.1)
actionmailer (= 5.1.6.1)
actionpack (= 5.1.6.1)
actionview (= 5.1.6.1)
activejob (= 5.1.6.1)
activemodel (= 5.1.6.1)
activerecord (= 5.1.6.1)
activesupport (= 5.1.6.1)
rails (5.1.7)
actioncable (= 5.1.7)
actionmailer (= 5.1.7)
actionpack (= 5.1.7)
actionview (= 5.1.7)
activejob (= 5.1.7)
activemodel (= 5.1.7)
activerecord (= 5.1.7)
activesupport (= 5.1.7)
bundler (>= 1.3.0)
railties (= 5.1.6.1)
railties (= 5.1.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
......@@ -221,9 +225,9 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.6.1)
actionpack (= 5.1.6.1)
activesupport (= 5.1.6.1)
railties (5.1.7)
actionpack (= 5.1.7)
activesupport (= 5.1.7)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
......@@ -256,7 +260,7 @@ GEM
redis-store (1.6.0)
redis (>= 2.2, < 5)
ref (2.0.0)
regexp_parser (1.3.0)
regexp_parser (1.4.0)
request_store (1.4.1)
rack (>= 1.4)
responders (2.4.1)
......@@ -272,7 +276,7 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
rspec-expectations (3.8.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-html-matchers (0.9.1)
......@@ -290,17 +294,15 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.65.0)
rubocop (0.68.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
psych (>= 3.1.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
unicode-display_width (>= 1.4.0, < 1.6)
ruby-progressbar (1.10.0)
sass (3.7.3)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
......@@ -341,8 +343,8 @@ GEM
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.4.1)
unf_ext (0.0.7.6)
unicode-display_width (1.5.0)
web-console (3.5.1)
actionview (>= 5.0)
activemodel (>= 5.0)
......@@ -372,8 +374,8 @@ DEPENDENCIES
database_cleaner
datagrid (~> 1.5)
dtu-core!
fakefs
fakeredis (~> 0.6.0)
fakefs!
fakeredis (~> 0.7)
font-awesome-rails (~> 4.7.0.3)
foreman (~> 0.84.0)
git (>= 1.2.2)
......
......@@ -4,7 +4,7 @@
<title>DTU Compute Course Website <%= my_course._id if my_course %></title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML-full"></script>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= stylesheet_pack_tag 'styles', media: 'all' %>
<%= javascript_pack_tag 'edit-page' %>
<script>
......
......@@ -2,7 +2,7 @@
<html>
<head>
<title>DTU Compute Course Website <%= my_course._id if my_course %> </title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_link_tag 'styles', media: 'all' %>
<%= javascript_pack_tag 'application' %>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="/images/kunlogo.png" rel="apple-touch-icon" type="image/png"/>
......
......@@ -3,7 +3,7 @@
<head>
<title>DTU Compute Course Website <%= my_course._id if my_course %> </title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML-full"></script>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= stylesheet_pack_tag 'styles', media: 'all' %>
<%= javascript_pack_tag 'application' %>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="<%= image_path 'kunlogo.png' %>" rel="apple-touch-icon" type="image/png"/>
......
......@@ -3,7 +3,7 @@
<head>
<title>DTU Course Website <%= my_course._id if my_course %> </title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML-full"></script>
<%= stylesheet_pack_tag 'styles', media: 'all' %>
<%= stylesheet_pack_tag 'styles.css', media: 'all' %>
<%= javascript_pack_tag 'application' %>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="<%= image_path 'kunlogo.png' %>" rel="apple-touch-icon" type="image/png"/>
......
......@@ -3,7 +3,7 @@
<head>
<title>DTUCourseWebsite</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML-full"></script>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= stylesheet_pack_tag 'styles', media: 'all' %>
<%= javascript_pack_tag 'application' %>
<%= javascript_pack_tag 'printable' %>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
......
......@@ -8,5 +8,6 @@ export PRECOMPILE=1
export DTU_DATA_ROOT=spec/files/data
bundle exec rake db:migrate
bin/rails webpacker:compile
bundle exec rspec ${test_arg} $@
......@@ -22,6 +22,8 @@ RSpec.describe MdSinglePageController, type: :controller do
FakeFS::FileSystem.clone(pages_files)
FakeFS::FileSystem.clone(File.join(Rails.root, 'app/views')) # https://github.com/fakefs/fakefs/issues/136
FakeFS::FileSystem.clone(File.join(Rails.root, 'spec/files'))
FakeFS::FileSystem.clone(File.join(Rails.root, 'public'))
FakeFS::FileSystem.clone(File.join(Rails.root, 'config'))
allow_any_instance_of(PagesService).to receive(:raw_md_folder).and_return(pages_files)
allow_any_instance_of(PagesService).to receive(:compiled_folder).and_return(pages_files)
get :show, params: { course_id: @test_course_id, page: 'TestPage', mode: 'view' }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment