Last active
August 29, 2015 14:24
-
-
Save palkan/c1a08ac2b4f141ab00cd to your computer and use it in GitHub Desktop.
Rubocop bug report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rubocop', github: 'bbatsov/rubocop' | |
GEMFILE | |
system 'bundle' | |
end | |
require 'bundler' | |
Bundler.setup(:default) | |
class Test # :nodoc: | |
def buggy | |
@events = Event.where('end_date > ?', DateTime.now).order(:start_date) | |
end | |
end | |
# This should print "Do not use DateTime.now without zone. Use Time.zone.now instead." | |
system 'bundle exec rubocop -R' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment