【发布时间】:2011-11-27 23:56:11
【问题描述】:
在 RSpec 测试中,按照约定或代码,是否有任何方法可以在测试运行之前启动 rails?我正在尝试为使用 chrome 的 selenium 测试设置一个测试框架,现在我只是因为缺少正在运行的服务器而受阻。
require 'spec_helper'
describe 'The first tab' do
before(:each) do
@driver = Selenium::WebDriver.for :chrome
end
it 'Shows the list' do
@driver.navigate.to 'index.html'
end
end
我是 RSpec 的新手,所以我不确定如何创建一套在 Rails 服务器运行时全部运行的测试。
【问题讨论】:
标签: ruby-on-rails ruby selenium rspec selenium-webdriver