Sha256: 55d2fca25c3e0c22e25de6f8ff0d1ff3bf6c958fe25ea359876e2d30f84f438f

Contents?: true

Size: 965 Bytes

Versions: 4

Compression:

Stored size: 965 Bytes

Contents

require "spec_helper"

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

  before do
    Teabag.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 "/teabag/integration?reporter=HTML"

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

    within("#teabag-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("#teabag-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

4 entries across 4 versions & 1 rubygems

Version Path
teabag-0.7.3 spec/features/html_reporter_spec.rb
teabag-0.7.2 spec/features/html_reporter_spec.rb
teabag-0.7.1 spec/features/html_reporter_spec.rb
teabag-0.7.0 spec/features/html_reporter_spec.rb