use any_instance_of in rspec

June 10, 2015

Reading time ~1 minute

You can use stub like this.

user.stub(:name).and_return("example")

But you can not use stub method to non-initialize object which is initialize in application logic (e.g. ApplicationController) In this case you need to use any_instance_of method.

ApplicationController.any_instance_of.stub(:auth?).and_return(true)

add ticket number to git commit automatically

Most of ticket tracker like Github, pivotal tracker have function to connect your commit to ticket(story).But every time when you commit ...… Continue reading

I will build frontend and backend separately

Published on September 28, 2016

order of angular controller's initialisation

Published on October 05, 2015