amatsuda / interactive_rspec

RSpec on IRB
MIT License
86 stars 8 forks source link

How do I reload a changed view in the test console? #4

Open gsmendoza opened 12 years ago

gsmendoza commented 12 years ago

Hello,

I noticed that, if config.cache_classes == true, I have to reload an app class before I run irspec on it:

load 'app/models/note.rb'
irspec 'spec/models/note_spec.rb'

It looks like I also have to reload views when I change them, but I don't know how. Do you have an idea how to do this?

Anyway, thank you very much for the gem. It worked out of the box compared to spork :)

Thanks,

George

maca commented 12 years ago

For running rails specs:

 > reload! # reloads your app code
 > FactoryGirl.reload! # if you are using factory girl since when reloading your app old classes are replaced with new ones
 > irspec 'spec'