Skip to content

Instantly share code, notes, and snippets.

@iwiznia
iwiznia / test.rb
Last active December 28, 2015 19:08
ActiveRecord merge test for order of joins
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@iwiznia
iwiznia / test.rb
Last active December 21, 2015 10:59
ActiveRecord Association with scope block tests
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end