Skip to content

Instantly share code, notes, and snippets.

MyklClason / Gemfile.rb
Last active Jun 5, 2019
Search/Sort/Paginate with Ransack and Kaminari
View Gemfile.rb
gem 'kaminari'
gem 'ransack'
doctorpangloss /
Last active Sep 22, 2021
Installing Caffe on Mac 10.11.5 and later in the 10.11 series, and 10.12.1 and later in the 10.12 series
# Install brew
/usr/bin/ruby -e "$(curl -fsSL"
# Apple hides old versions of stuff at
# Install the latest XCode (8.0).
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew.
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after
# you have installed caffe.
# Install CUDA toolkit 8.0 release candidate
# Register and download from
View Testing Modules with

It can be difficult to test the different scenarious for a module intended for use by including in another class.

If the class is statically defined in the spec, any later definitions extend, not replace, the first definition - which can cause test issues and breaks isolation between examples.

RSpec.describe SomeModule do
  class SomeIncluder
    include SomeModule