Displaying 1 result from an estimated 1 matches for "fake_request".
Did you mean:
make_request
2008 Jan 18
5
How do I pass form values from POST controller specs?
...roject], but it''s nil. I tried this instead to work
around it:
describe "create action" do
it "should create a new project" do
project_params = {:name => ''bekkunin''}
Project.should_receive(:create).with(project_params)
req = fake_request
req[:project] = project_params
controller, action = post(''/projects'', :fake_request => req)
end
end
Now my action doesn''t even get called. the value of action is
''bad_request'', probably because the fake request I created doesn'&...