Monthly Archives: March 2014

Ruby Tips

Inject http://blog.flvorful.com/2010/01/24/a-simple-pattern-for-rubys-inject-method http://stackoverflow.com/questions/3455627/how-does-this-ruby-injection-magic-work Exclamation marks (!) with functions In general, methods that end in ! indicate that the method will modify the object it’s called on. Ruby calls these “dangerous methods” because they change state that someone else might have … Continue reading

Posted in Ruby | Tagged | Leave a comment

RSpec – doubles stub and mock

doubles when we depend on components with nondeterministic characteristics, we may find that files get corrupted, disk fail, networks time out, and servers go down in the middle of running specs. because these are things that we have no control … Continue reading

Posted in rails, ROR, ruby on rails, testing, web development | Tagged , , , , , | Leave a comment