search for: fakerequest

Displaying 2 results from an estimated 2 matches for "fakerequest".

2007 Jul 29
7
Merb test harness
Ezra, * test harness in new generated merb apps with helpers for testing merb without starting a server. * pin down plugin arch Seems to me that these two tasks go together unless you want to have rspec built in Merb. Regarding the test harness, my understanding is that: - a developer should be able to easily write specs against a merb application. - a developer should not need to start a merb
2008 Jan 18
5
How do I pass form values from POST controller specs?
...do it "should create a new project" do project_params = {:name => ''bekkunin''} Project.should_receive(:create).with(project_params) controller, action = post(''/projects'', :project => project_params) end end Merb::Test::FakeRequest#with (and #new) invoke Hash#environmentize_keys! on the hash I send in as the 2nd arg to post, and this seems very odd to me. Why is it upcasing the keys in the hash *I* send in from my spec? In my controller action, I try to access params[:project], but it''s nil. I tried this instead to w...