Integrate_views is not executing my views

I wanted to use “integrate_views” as Ryan explains in his RailsCast #71
(http://railscasts.com/episodes/71)

…but I can’t get it to work: the view code in not executed

I looked everywhere but I can’t understand what I am doing wrong.
Here is what I did:
I created a new application from scratch (Rails 2.0.2), added rspec and
rspec_on_rails plugins, and run
script/generate rspec_scaffold User name:string

This is my users_controller spec:

describe UsersController do
fixtures :users
integrate_views

describe “handling GET /users” do
it “should be successful” do
get :index
response.should be_success
end
end
end

I then added something wrong (on purpose) in index.html.erb (<% WRONG
%>) so that when I visit /users I get a view error (undefined local
variable or method…)

But when I run the spec everything is ok and the test does NOT fail :frowning:
I can even trash the index.html.erb file and the test still passes

On Jan 23, 2008 1:17 AM, Ze No [email protected] wrote:

end

end
end

Try it without nesting:

describe UsersController, “handling GET /users” do
fixtures :users
integrate_views

it “should be successful” do
get :index
response.should be_success
end
end

If that works, then you’ve uncovered a bug with integrate_views not
working in nested example groups. If so, please report it to the
tracker:

http://rspec.lighthouseapp.com

Thanks,
David

You are God.
Thanks! You can’t imagine the amount of time we wasted on that one :wink:

If that works, then you’ve uncovered a bug with integrate_views not
working in nested example groups.

that was exactly the problem.

If so, please report it to the tracker

definitely