From 7ed2f604d431258412682237634c40be9e7a0e70 Mon Sep 17 00:00:00 2001 From: Prommah Date: Thu, 29 Oct 2015 06:43:02 +0000 Subject: [PATCH 1/2] Removed unpopular non-default style rule --- config/styles/ruby.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/config/styles/ruby.yml b/config/styles/ruby.yml index 2d6dc0f..c97ef12 100755 --- a/config/styles/ruby.yml +++ b/config/styles/ruby.yml @@ -13,14 +13,6 @@ Style/CollectionMethods: find: detect find_all: select reduce: inject -Style/DotPosition: - Description: Checks the position of the dot in multi-line method calls. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains - Enabled: true - EnforcedStyle: trailing - SupportedStyles: - - leading - - trailing Style/FileName: Description: Use snake_case for source file names. StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files From 878f61573a71e5a1ab57fca4beedf9ed33f6e8ed Mon Sep 17 00:00:00 2001 From: Prommah Date: Thu, 29 Oct 2015 22:02:29 +0000 Subject: [PATCH 2/2] Update deprecated spec_helper code & styling --- spec/spec_helper.rb | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) mode change 100644 => 100755 spec/spec_helper.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb old mode 100644 new mode 100755 index 85567d0..9aa57cb --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,20 +1,21 @@ -ENV["RAILS_ENV"] ||= 'test' +ENV["RAILS_ENV"] ||= "test" -require 'codeclimate-test-reporter' -require 'simplecov' +require "codeclimate-test-reporter" +require "simplecov" CodeClimate::TestReporter.start -SimpleCov.start 'rails' +SimpleCov.start "rails" require File.expand_path("../../config/environment", __FILE__) -require 'rspec/rails' -require 'capybara/rspec' -require 'capybara/poltergeist' +require "rspec/rails" +require "capybara/rspec" +require "capybara/poltergeist" Capybara.default_wait_time = 5 Capybara.register_driver :poltergeist do |app| - Capybara::Poltergeist::Driver.new(app, + Capybara::Poltergeist::Driver.new( + app, timeout: 30, - phantomjs_logger: File.open('/dev/null') + phantomjs_logger: File.open("/dev/null") ) end @@ -30,16 +31,16 @@ RSpec.configure do |config| config.include Features::SessionHelpers, type: :feature config.fixture_path = "#{::Rails.root}/spec/fixtures" - config.order = 'random' + config.order = "random" config.use_transactional_fixtures = false config.color = true config.formatter = :documentation config.infer_spec_type_from_file_location! config.before(:each) do - events_list_json = JSON.parse(File.read(Rails.root.join('spec/fixtures/google_calendar.json'))) + events_list_json = JSON.parse(File.read(Rails.root.join("spec/fixtures/google_calendar.json"))) - GoogleCalendar::Request.stub(:events_list) do + allow(GoogleCalendar::Request).to receive(:events_list) do GoogleCalendar::EventList.new(events_list_json, Time.zone.name) end end