-
describe vs. context in rspec
In Rspec world, you often see people using both “describe” blocks and “context” blocks together, like this describe “launch the rocket” do context “all ready” do end context “not ready” do end end So what’s the difference between “describe” and “context” really? According to the rspec source code, “context” is just a alias method of “describe”, […]
-
Injet method into an Ruby object in run time
class Person end person = Person.new def person.talk puts “Hi” end person.talk