相关疑难解决方法(0)

以前可以使用:全部用水豚吗?

我有一个这样的描述块:

describe "Documents" do
  subject { page }
  let (:course) { FactoryGirl.create(:course) }
  describe "new" do
    before do
      visit new_course_document_path(course)
      fill_in "Name", with: "TestDocument"
      attach_file "Original document", "#{Rails.root}/spec/fixtures/03_GUI_concurrency.pdf"
    end
    it { should have_selector('title', text:"Upload document")}
    it { should have_selector('h1', text:"Upload document")}
    describe "when clicking upload" do
      before { click_button "Upload Document" }
      it "should have the document name" do
        subject.should have_selector('p', text: "TestDocument")
      end

      it "should have 22 pages" do
        subject.should have_selector('.page', count: 22)
      end

      describe "when visiting the course …
Run Code Online (Sandbox Code Playgroud)

ruby rspec ruby-on-rails capybara

6
推荐指数
1
解决办法
2746
查看次数

标签 统计

capybara ×1

rspec ×1

ruby ×1

ruby-on-rails ×1