Skip to content

Instantly share code, notes, and snippets.

View acnalesso's full-sized avatar

Antonio C Nalesso Moreira acnalesso

View GitHub Profile

simple.rb

code = <<END
class Adder
  def add_two(x)
    x+2
  end
end
@myronmarston
myronmarston / explanation.md
Last active October 22, 2020 18:16
Explanation for why `its` will be removed from rspec-3

its isn't core to RSpec. One the of the focuses of RSpec is on the documentation aspects of tests. Unfortunately, its often leads to documentation output that is essentially lies. Consider this spec:

User = Struct.new(:name, :email)

describe User do
  subject { User.new("bob") }
  its(:name) { should == "bob" }
end