search for: mock_pag

Displaying 1 result from an estimated 1 matches for "mock_pag".

Did you mean: mock_page
2008 Aug 11
1
Confused about square bracket usage.
I ran script/generate rspec_scaffold page title:string body:text and have been reading on the generated code in my spare time in an attempt to fully understand rspec. It mostly makes a lot of sense except for the square brackets in the snippet below. To my best understanding, [mock_page] would be an array containing mock_page. That almost makes sense, buy why wouldn''t the variable mock_page simply be an array like @pages. You wouldn''t say [@pages]. I can''t get my head wrapped around the syntax. Thanks in advance. pages_controller_spec.rb def mock_pa...