mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-13 21:31:28 +00:00
Merge branch 'feature/ci-improvements' into develop
Conflicts: .travis.yml
This commit is contained in:
commit
ac6ca8bb01
6 changed files with 21 additions and 26 deletions
18
.travis.yml
18
.travis.yml
|
@ -1,18 +0,0 @@
|
|||
language: ruby
|
||||
bundler_args: --jobs=3 --retry=3
|
||||
cache:
|
||||
bundler: true
|
||||
addons:
|
||||
code_climate:
|
||||
repo_token: b3db5b7df9a0a1d0fd3503e72d7431ffbfa172492c2840d590ccb2fafd9172d3
|
||||
rvm:
|
||||
- 2.1.5
|
||||
env:
|
||||
- MYSQL_USERNAME=travis
|
||||
- APP_SECRET=2d3a08dfea079fe45bcb7f830b010eda
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
script:
|
||||
- RAILS_ENV=test bundle exec rake db:create db:migrate db:test:prepare
|
||||
- RAILS_ENV=test bundle exec rspec spec
|
|
@ -1,4 +1,4 @@
|
|||
[![Build Status](https://travis-ci.org/ENSL/ensl.org.svg?branch=master)](https://travis-ci.org/ENSL/ensl.org)
|
||||
[![Circle CI](https://circleci.com/gh/ENSL/ensl.org.svg?style=svg)](https://circleci.com/gh/ENSL/ensl.org)
|
||||
[![Code Climate](https://codeclimate.com/github/ENSL/ensl.org.png)](https://codeclimate.com/github/ENSL/ensl.org)
|
||||
[![Code Climate](https://codeclimate.com/github/ENSL/ensl.org/coverage.png)](https://codeclimate.com/github/ENSL/ensl.org)
|
||||
|
||||
|
|
4
circle.yml
Normal file
4
circle.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
database:
|
||||
override:
|
||||
- mv config/database.circle.yml config/database.yml
|
||||
- bundle exec rake db:create db:schema:load --trace
|
7
config/database.circle.yml
Normal file
7
config/database.circle.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
test:
|
||||
socket: /var/run/mysqld/mysqld.sock
|
||||
host: localhost
|
||||
database: circle_ruby_test
|
||||
adapter: mysql2
|
||||
encoding: utf8
|
||||
username: ubuntu
|
|
@ -1,13 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Google Calendar widget', js: :true do
|
||||
let(:events_list_json) { JSON.parse(File.read(Rails.root.join('spec/fixtures/google_calendar.json'))) }
|
||||
|
||||
before do
|
||||
GoogleCalendar::Request.stub(:events_list) do
|
||||
GoogleCalendar::EventList.new(events_list_json, Time.zone.name)
|
||||
end
|
||||
|
||||
visit root_path
|
||||
end
|
||||
|
||||
|
@ -75,7 +69,7 @@ feature 'Google Calendar widget', js: :true do
|
|||
end
|
||||
|
||||
def timezone_adjusted
|
||||
if Time.now.dst?
|
||||
if Time.zone.now.dst?
|
||||
"14:30 EDT"
|
||||
else
|
||||
"15:30 EST"
|
||||
|
|
|
@ -31,4 +31,12 @@ RSpec.configure do |config|
|
|||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
config.order = 'random'
|
||||
config.use_transactional_fixtures = false
|
||||
|
||||
config.before(:each) do
|
||||
events_list_json = JSON.parse(File.read(Rails.root.join('spec/fixtures/google_calendar.json')))
|
||||
|
||||
GoogleCalendar::Request.stub(:events_list) do
|
||||
GoogleCalendar::EventList.new(events_list_json, Time.zone.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue