Sha256: 2fd236318b144aa2b09a3b2b9ece3a9e32fc2267b9ad980480e85903fb7d0bea

Contents?: true

Size: 982 Bytes

Versions: 5

Compression:

Stored size: 982 Bytes

Contents

require "spec_helper"

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

  before do
    Teabag.configuration.suite :integration do |suite|
      suite.matcher = "spec/dummy/app/assets/javascripts/integration/*_spec.{js,js.coffee,coffee}"
      suite.helper = nil
    end
  end

  after do
    Teabag.configuration.suites = {}
  end

  scenario "gives me the expected results" do
    visit "/teabag/integration"

    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

5 entries across 5 versions & 1 rubygems

Version Path
teabag-0.5.5 spec/features/html_reporter_spec.rb
teabag-0.5.4 spec/features/html_reporter_spec.rb
teabag-0.5.3 spec/features/html_reporter_spec.rb
teabag-0.5.2 spec/features/html_reporter_spec.rb
teabag-0.5.1 spec/features/html_reporter_spec.rb