Sha256: a74859e7c4982be19804acd031afdaee77514ed902a11087ae25e484d8ce669a
Contents?: true
Size: 1.62 KB
Versions: 4
Compression:
Stored size: 1.62 KB
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 feature "testing with teaspoon in the browser with turbolinks", 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 = "turbolinks_helper" } end scenario "executes teaspoon in each page navigation" do visit "/teaspoon/integration?reporter=HTML" within("#teaspoon-progress") do expect(find("em")).to have_text("100%") end find("#teaspoon-report-failures li.spec a").click within("#teaspoon-progress") do expect(find("em")).to have_text("100%") end end end
Version data entries
4 entries across 4 versions & 1 rubygems