Hi Fred,

Here is some code:
------------------

require 'test_helper'

class Admin::OrdersControllerTest < ActionController::TestCase

  def setup
    @controller = Admin::OrdersController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new
    @controller.expects(:admin?).at_least_once.returns(true)
    @order = Factory.order
  end

  def test_index
    get :index
    assert_response :success
  end
end


And here is the error message:
------------------------------

1) Error:
test_index(Admin::OrdersControllerTest):
NoMethodError: undefined method `expects' for 
#<Admin::OrdersController:0x229a32c @real_format=nil>
-- 
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 group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to