Yago Santos de Sousa
Joined
4,430 Experience
44 Lessons Completed
0 Questions Solved
Activity
Posted in Hashes in Ruby Discussion
If we use h = HashWithIndifferentAccess.new({key: "value"})
it will allow us to access the value through both h[:key]
and h["key"]
.
Oh, I see. Thanks, Chris!
I had to include RSpec::Rails::RequestExampleGroup
so it'd allow me to use host!
. I'm trying to figure that out now - good thing the specs are working now, though :)
This has helped me a lot! Thanks, folks!
One thing I'm stuck on is how to write the specs when I have a domain constraint. I've been trying to figure out how to force my request to go through a specific domain, instead of localhost. Is that possible at all?