Hi,
I am a new comer of testing on rails .
I am trying to testing my controller, and read a lot of testing using rspec and shoulda.
can anyone give me some examples about those rspec.
cuz sometime i did not understand how to use rspec for the controller.
def create
@user = User.new(params[:user])
@user.is_admin = false
@user.enabled = false
if @user.save
redirect_to :action => “confirm”
else
@cultures = Culture.where(:enabled => true)
@languages = Language.where(:enabled => true)
render “new”
end
end
def show
redirect_to :action => “edit”
end
if my controller like that… how can i test by using rspec… please help