Returns reload is not method.
sorry for wrong syntax
it must be
reload!
you are using Word.find(:id.to_param).status in assert instead of that
use
Word.find_by_user_id(1).status( as per your fixture in first
post)
def test_should_delete_word
assert_equal 'published',
Here is the test:
def test_should_delete_word
assert_equal 'published', words(:one).status
debugger
delete :destroy, :id = words(:one).to_param
assert_equal 'deleted', words(:one).status
end
It fails on the last with: deleted expected but was published.
if
def test_should_delete_word
assert_equal 'published', words(:one).status
debugger
delete :destroy, :id = words(:one).to_param
Word.reload
word_status=Word.find(:id).status
assert_equal 'deleted', word_status
end
--
nik
--
Posted via
was
[quote]
Expect response to be a :success,but was 500
[/quote]
Am I missing something ?
what is output in test log file?
you can try this on console
follow the steps
1)go to console (ruby script/console)
2)app.get /catalog
see what response you get
--
Posted via
fireflyman wrote:
Session ID: 6efd9f650c0eb779f4726c3b5b0c609c
Parameters: {}
ActionController::RoutingError (No route matches /catalog with
{:method=:get}):
Rendering
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/templates/rescues/layout.erb
(not_found)
fireflyman wrote:
So,What should I do ?I'm a fresher.
go to
http://guides.rubyonrails.org/testing.html
http://6brand.com/rails-integration-testing-how-to-learn.html
read about rails integration testing
do
rake routes
you will get all the routes in your application
then perform integration
rake aborted!
wrong number of arguments (2 for 1)
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:
344:in `recreate_database'
Thanks!
Thomas
do you have test database created ?
--
Posted via http://www.ruby-forum.com/.
mahesh wrote:
Hi guys
Im new to rails i would like to create app with swf file upload with
multiple file upload,
is that any sample app is available with multiple file uploads plz
give me some reference for me
Ur's
Mahesh
Use Acts_As_Attachment plugin
Ghanshyam Rathod wrote:
Hi all,
Please help me out for authorize.net CIM(customer information manager)
implementation.
thanks
go to this site
http://www.rubyplus.org/episodes/68-Rails-with-Active-Merchant-Authorize-Net-CIM-Gateway.html
--
Posted via http://www.ruby-forum.com/.
Any ideas?
Kind regards
Axinte
validates_date_time plug in may help...
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this
Looking around -- someone had a problem that the new object was not
created or saved. One of the tests in products_controller_test.rb has
no problem creating a new product.
What am I missing?
try this.
this may work
test product_administartion_by_admin do
category =
Please, someonepoint me to a decent, lightweight IDE. All i want
is syntax coloring. I'm thinking notepad++ here. Anyone have a better
solutions? Thanks. RVince
try NetBeans IDE it's nice
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
hi all,
On my page i am displaying business url entered by user it stored in
database
(code is in haml)
= link_to @user.website,@user.website
if url stored in database is www.abc.com
then on click of that link it goes to http://sarasaves/at/www.abc.com
and shows
Routing Error
No
Tim Teng wrote:
You may try link_to www.abc.com, http://www.abc.com;.
but, i am taking different values of business_url from database
depending on user
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you
You might want to (re)consider which is most appropriate to store for
your app's current and future use.
FWIW,
--
Hassan Schroeder hassan.schroe...@gmail.com
twitter: @hassan
it's working
Thnaks...
--
Posted via http://www.ruby-forum.com/.
How do I make it that no matter what the user type it, link_to would
take them to an external site?
Sorry if this sounds like a too basic question.
Thanks.
try this
this may work
link_to @user.website,http://#...@user.website};, :popup =true
--
Posted via
How do I make it that no matter what the user type it, link_to would
take them to an external site?
Sorry if this sounds like a too basic question.
Thanks.
do this no matter what URL user enters it will take him to correct page
regex = /https?:\/\/(.*)/.match(@user.website)
Any thoughts and suggestion will be appreciable.
Thanks,
Sandy
hi,.
may be you can prepare rails engine or plug in of one application and
install in into another...
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this
18 matches
Mail list logo