I have an error of undefined method.
can anyone help me to solve it.
I follow the tutorial to practicing testing controller of rails, and
now i got stuck with the error… plz help
error:
undefined method post' for #<Spec::Example::ExampleGroup::Subclass_1:0xb7754114> undefined method
assigns’ for
#Spec::Example::ExampleGroup::Subclass_1:0xb785d1b4
Test file
describe “GET Index” do
def mock_product(stubs={})
post ‘index’
@mock_user ||= mock_model(User, stubs).as_null_object
end
def setup
@user = User.new
end
controller file
def index
@users = User.find(:all)
end
please give me some help …
thanks
Yennie