RailsCasts Pro episodes are now free!

Learn more or hide this

Scott Martin's Profile

GitHub User: scottmartin

Comments by Scott Martin

Avatar

I just wanted to say thanks. Your tip just saved me after almost an hour of looking for a solution. I would guess that line has something to do with IPv6 address support.

Avatar

Everything seems to be working just fine for me except one thing. Every time I save a spec file and those tests get run, the time that RSpec says they finished in is actually the amount of time that Guard has been running. So the time in seconds just keeps getting bigger. Has anyone else encountered this? Any ideas how to fix it?

I'm using Ruby 1.8.7, Rails 3.1, and everything else is pretty much the same as the screencast.

Avatar

The show notes point out that this follows the work covered in http://railscasts.com/episodes/275-how-i-test. In that episode Ryan showed us how he handles testing on a normal project. His techniques there would cover what you are talking about.

Avatar

Please correct me if I'm mistaken, but shouldn't your present definition in the ApplicationController look like this?

ruby
def present(object, klass = nil)
  klass ||= "#{object.class}Presenter".constantize
  klass.new(object, view_context)
end

The object comes before the template in the initialize method of the BasePresenter.

Avatar

Once again you've provided an excellent and educational screencast. It looks like our testing environments are quite similar. However, I've only recently gotten into testing and I was struggling with finding an approach that made the most sense to me, and controller and view specs happened to be the ones giving me the most trouble. Thank you for providing another perspective of how to tackle testing. It was a tremendous help.

Keep up the great work.

Avatar

Thanks. They have disappeared for me as well.

Avatar

Love the new design. Keep up the great work. Also, I see "Edit", "Hide", and "Destroy" links on Carlos' comment. Not sure if that was suppose to happen.