Are you noticing that you are trying to test different things at different test cases? (the first contexts you aren't executing the action "get :x", the last ones you are doing "get :show"
First of all you should think about the behavior of your code, so, i can think of two contexts (what kind of situations do you have in this case):
# with valid parameters(for e.g.: i should pass the right data, before this context i must create the data for the text).
# with invalid parameters(for e.g: the parameters passed to the GET request should not be existent on the system).
Then you should think about what happens when this contexts are active.
context "with valid parameters" do
it "should return the other movies of the same director, and assign it to the @movies"
it "should render the template of the #find_same_director page"
end
context "with invalid parameters" do
it "should redirect to the movies_path"
it "should put a flash message that the director is invalid"
end
After you think about the test cases do you have to think about how to implement them, i'll give you a hint:
it "should return the other movies of the same director, and assign it to the @movies" do
# THINKING ABOUT BDD HERE YOU SHOULD THINK OF THIS CODE SECTIONS AS FOLLOW:
# GIVEN ( OR THE CONDITIONS FOR THE ACTION HAPPEN)
@director = Director.new
movies = [Movie.new, Movie.new]
@director.movies = movies
# HERE ILL FIX THE VALUES SO I CAN USE IT ON MY EXPECTATIONS
Director.stub!(:find).with(@director_id).and_return(@director)
# WHEN, THE ACTION HAPPENED
get :find_same_director, :id => @director_id
# THEN THE EXPECTATIONS THAT SHOULD BE MATCHED
assigns(:movies).should == @director.movies
end
For a more real experience with tests i recommend you to watch the screencasts: http://destroyallsoftware.com/