https://github.com/haloflightleader/bank/commit/88762271b5feda1390054b472cfb1de006c2b5da

I corrected my code, but am still getting this:
 

> Failures:
>   1) AccountsController Get new assigned @account
>      Failure/Error: expect( assigns(:account) ).to eq( [account] )
>        
>        expected: [#<Account id: nil, name: nil, description: nil, 
> account_number: nil, created_at: nil, updated_at: nil>]
>             got: #<Account id: nil, name: nil, description: nil, 
> account_number: nil, created_at: nil, updated_at: nil>
>        
>        (compared using ==)
>        
>        Diff:
>        @@ -1,2 +1,2 @@
>        -[#<Account id: nil, name: nil, description: nil, account_number: 
> nil, created_at: nil, updated_at: nil>]
>        +#<Account id: nil, name: nil, description: nil, account_number: 
> nil, created_at: nil, updated_at: nil>
>        
>      # ./spec/controllers/accounts_controller_spec.rb:21:in `block (3 
> levels) in <top (required)>'
> Finished in 0.13115 seconds
> 18 examples, 1 failure
> Failed examples:
> rspec ./spec/controllers/accounts_controller_spec.rb:18 # 
> AccountsController Get new assigned @account
> Randomized with seed 52138


On Saturday, November 16, 2013 10:08:48 PM UTC-8, Peter wrote:
>
> Hello Everyone,
>
> Why is my controller test in the get method not working?
>
> https://github.com/haloflightleader/bank/blob/02695c7c5106b30e178d3a0d05125f8deedd5e67/spec/controllers/accounts_controller_spec.rb#L18
>
> This is practically a copy from the rails guides and it works in my index 
> test. The render test works... it's only the assigns portion that refuses 
> to work.
>
> I'm studying Rails, but am focusing on rspec because Rails by itself is 
> easy and I feel that I don't want to write anything without rspec being 
> right next to it, even if I have to write the tests after. I have gone 
> through several tutorials already:
> Michael Hartl's, Pragmatic Studio, and Code School.
>
> So now, I just need to do it and gain proficiency. Thank you.
>
> p
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/ba9d2bcc-0b33-4466-9bfa-f85b69fa4b84%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to