On Jun 21, 2012, at 11:12 AM, n/a n/a wrote:
> I've been trying to learn RSpec using the book The RSpec Book by David
> Chelimsky but I've been having a problem in Chapter 5 around page 50. I
> tried running "rspec spec/codebreaker/game_spec.rb --format doc" but it
> said that codebreaker could n
I've been trying to learn RSpec using the book The RSpec Book by David
Chelimsky but I've been having a problem in Chapter 5 around page 50. I
tried running "rspec spec/codebreaker/game_spec.rb --format doc" but it
said that codebreaker could not be found.
The file spec/codebreaker/game_spec.rb re
Thanks for the hint. But I would like to mock the UploadedFile object (I don't
want to load a file..).
My current workaround is to stub the params hash:
controller.stub(:params).and_return { file: file }
Would be nice if I could just pass in the mocked UploadedFile object...
On 21.06.2012, at
On Jun 20, 2012, at 4:18 AM, David Piegza wrote:
> Hi,
>
> I'm trying to mock an UploadedFile object and pass it to a controller action.
> Unfortunately, the mocked object gets stringified in the params hash, so I'm
> not able to use the mock object in a test.
>
> Is there any way to avoid th