Sha256: 84d2e4d592b806cb8c7e0639aabd1efabec2ec8c4a639f97387865581e5cbf56

Contents?: true

Size: 977 Bytes

Versions: 2

Compression:

Stored size: 977 Bytes

Contents

require "spec_helper"

feature "testing with teaspoon in the browser", js: true do

  before do
    Teaspoon.configuration.stub(:suites).and_return "integration" => proc{ |suite|
      suite.matcher = "spec/dummy/app/assets/javascripts/integration/*_spec.{js,js.coffee,coffee}"
      suite.helper = nil
    }
  end

  scenario "gives me the expected results" do
    visit "/teaspoon/integration?reporter=HTML"

    within("#teaspoon-progress") do
      expect(find("em")).to have_text("100%")
    end

    within("#teaspoon-stats") do
      expect(find("li:nth-child(1)")).to have_text("passes: 4")
      expect(find("li:nth-child(2)")).to have_text("failures: 1")
      expect(find("li:nth-child(3)")).to have_text("skipped: 1")
    end

    within("#teaspoon-report-failures") do
      expect(find("li.spec")).to have_text("Integration tests allows failing specs.")
    end

    expect(find("#spec_helper_el")).to have_text("this was generated by the spec_helper")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
teaspoon-0.7.5 spec/features/html_reporter_spec.rb
teaspoon-0.7.4 spec/features/html_reporter_spec.rb