This is a cheat sheet for RSpec, including its methods, and test doubles. It also includes FactoryGirl methods, even though that is separate from RSpec. This cheat sheet is based on Rails 4 Test Prescriptions by Noel Rappin (the best of a bad lot when it comes to RSpec books) and the RSpec documentation published on Relish. RSpec documentation is generally not very good, which is why I created this cheat sheet for myself.
This file contains 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
API levels: | |
Nexus S: 10 (6%) | |
Nexus 7: 17 (18%) | |
? 19 (39%) | |
Cameras: | |
Open Camera | |
http://opencamera.sourceforge.net/ | |
http://sourceforge.net/p/opencamera/code/ci/master/tree/ | |
This is all about the receiver.
- Public is the simple case, these messages can be sent to any receiver, explicit or implicit.
- Explicit:
var_name.method_name
;self.method_name
. - Implicit: (inside a class, just calling
method_name
) because the receiver isself
even though it's not "mentioned"
- Explicit:
- Private methods, the receiver is always
self
. It is not possible to callvar_name.method_name
, ie, only implicit invocation is possible.- The result is that these methods can only be called (with implicit receiver) from within the class in which they are defined. But this is not about information hiding, it is about the receiver of the message.
- Protected methods are like private except that explicit receivers are allowed when the message is sent from a class of the same type.
http://www.se-radio.net/2018/01/se-radio-episode-315-jeroen-janssens-on-tools-for-data-science/
2018-01-23 / 2018-02-11
- Definition: extracting value from data; two forms:
- Analysis that you make, giving additional insight.
- Integrate into product (eg, recommendations in Netflix).
- What's different about data science from statistics? Statistics is a part of data science.
This file contains 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
# frozen_string_literal: true | |
# Rails 7.1.0.alpha | |
# Ruby 3.2.2 | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" |