I was trying to run my tests through CodeShip and somehow it doesn't allow me to setup my test environment.
My config scripts are:
rvm use 2.4 --install
bundle install
rake db:create RACK_ENV=test
rake db:migrate RACK_ENV=test
rake db:seed RACK_ENV=test
My test script is simply rake test
My Rakefile looks like this:
require 'sinatra/base'
require 'sinatra/activerecord'
require 'sinatra/flash'
require 'sinatra/cookies'
require 'require_all'
require 'sinatra/activerecord/rake'
require 'rake/testtask'
Rake::TestTask.new { |t| t.pattern = 'spec/*/*_spec.rb' }
And somehow CodeShip keeps complaining that it cannot load 'sinatra/base' from my Rakefile even though it has been installed onto the VM. rake test
also runs fine on my local machine so I have no idea what went wrong there.
Can anyone suggests what happened? Thanks.