i want to test a method created to returns data:
Routes.rb
resources :foos do
member do
get "method"
end
end
controller.rb
class FoosController < ApplicationController
def method(var)
instance = One::Two::Instance.new
get = instance.get var #var is a string
end
i don't know how to proceed, test or anything from here. i've seen one testing by sending params through the address bar of the browser, i don't have a view for this mehod(is it necessary?). i don't know how to send params from the form either.
thx for your attention
Aucun commentaire:
Enregistrer un commentaire