English 中文(简体)
在项目经理评估中测试新项目的最佳方法
原标题:Best way to test creating new project in project manager app

在我看来,我正在测试一个新项目。 目前,我采用rs子进行融合测试。 我的守则如下:

  3 describe "Projects" do
  4   describe "create project" do
  5     it "should create a new project" do
  6       lambda do
  7         visit root_path
  8         click_link  new project         
  9         fill_in :name, :with =>  Project name 
 10         fill_in :description, :with =>  This is a description 
 11         click_button  Create 
 12       end.should change(Project, :count).by(1)
 13     end
 14   end
 15 end

我也要在第11行之后补充如下内容:

response.should render_template  new 

......但我仍照此错误

@request must be an ActionDispatch::Request

我这样做了吗? 什么是最佳做法?

最佳回答
current_path.should == new_project_path
page.should have_selector( div#error_explanation )

https://stackoverflow.com/a/9105371/724036”

问题回答

暂无回答




相关问题
Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Best browser for testing under Safari Mobile on Linux?

I have an iPhone web app I m producing on a Linux machine. What s the best browser I can use to most closely mimic the feature-limited version of Safari present on the iPhone? (It s a "slimmed down" ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Is there any error checking web app cralwers out there?

Wondering if there was some sort of crawler we could use to test and re-test everything when changes are made to the web app so we know some new change didn t error out any existing pages. Or maybe a ...

热门标签