scholarslab/prism — comment on commit 906ae15a2dcef69f983247e9077a6b59e2f23b89
File:  line 0
By erochest:

Great! Good job sticking with it and working through the problems testing UserController.

For some reason your document controller test isn't testing what you think it is, however. If you add this to the test just at after the visit line, that there aren't any actual documents in the test database, and that the page being returned successfully is the index page.

```ruby
Document.all.each do |doc|
puts "DOC [#{ doc.inspect }]\n"
end
puts "DOC COUNT = #{ Document.count }\n"
puts "PAGE #{ page.current_url } =>\n#{ page.html }\n"
```

I think what you want to do is something like this:

```ruby
before(:each) do
@doc = Factory(:document)
end

it "returns http success" do
visit "/documents/#{ @doc.id }"
```