just because self.use_transactional_fixtures = true
rollback
^_^ I resolved this problem by myself.
On May 8, 3:06 pm, smellcode
<smellc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> in chapter 13
>
> def test_100_orders
> Order.delete_all
> LineItem.delete_all
>
> @controller.logger.silence do
>
> elapsed_time = Benchmark.realtime do
> 100.downto(1) do |prd_id|
> cart = Cart.new
> cart.add_product(Product.find(prd_id))
> post :save_order,
> { :order => DAVES_DETAILS },
> { :cart => cart }
> assert_redirected_to :action => :index
> end
> end
> assert_equal 100, Order.count
> assert elapsed_time < 3.00
>
> end
>
> end
>
> my question is : the test is ok, but after this test, my mysql
depot_test''s
> orders table is empty and produtions table has 1000 records.
>
> but in the test:assert_equal 100, Order.count is ok?
>
> why?
>
> --
> Hu Jinpu (nickname: smellcode)
> Web developer
> email =~ /(^hujinpu)\@(gmail)\.(com)$/
> or email.gsub!(/hujinpu/, ''smellcode'')http://hujinpu.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---