Sha256: 89a19aba6e39319edc625f4c824a3082a4f50e7d8c3fd21d66a1d261ed601bdc

Contents?: true

Size: 683 Bytes

Versions: 22

Compression:

Stored size: 683 Bytes

Contents

require 'spec_helper'

describe Konacha, :type => :feature do
  before do
    Konacha.mode = :server
  end

  around do |example|
    begin
      spec_dir = Konacha.config.spec_dir
      Konacha.config.spec_dir = "spec/isolated/errors"
      example.run
    ensure
      Konacha.config.spec_dir = spec_dir
    end
  end

  it "inserts a failing test when an iframe fails to load" do
    silencing_stderr do
      visit "/failing_iframe_spec"
      page.should have_content("failing_iframe_spec.js.coffee")
      page.should have_css(".test.fail")
    end
  end

  def silencing_stderr
    stderr = $stderr
    $stderr = StringIO.new
    yield
  ensure
    $stderr = stderr
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
konacha-4.0.0 spec/error_handling_spec.rb
konacha-3.7.0 spec/error_handling_spec.rb
konacha-3.6.0 spec/error_handling_spec.rb
konacha-3.5.1 spec/error_handling_spec.rb
konacha-3.5.0 spec/error_handling_spec.rb
konacha-3.4.0 spec/error_handling_spec.rb
konacha-3.3.0 spec/error_handling_spec.rb
konacha-3.2.5 spec/error_handling_spec.rb
konacha-3.2.4 spec/error_handling_spec.rb
konacha-3.2.3 spec/error_handling_spec.rb
konacha-3.2.2 spec/error_handling_spec.rb
konacha-3.2.1 spec/error_handling_spec.rb
konacha-3.2.0 spec/error_handling_spec.rb
konacha-3.1.0 spec/error_handling_spec.rb
konacha-3.0.0 spec/error_handling_spec.rb
konacha-2.7.0 spec/error_handling_spec.rb
konacha-2.6.0 spec/error_handling_spec.rb
konacha-2.5.1 spec/error_handling_spec.rb
konacha-2.5.0 spec/error_handling_spec.rb
konacha-2.4.0 spec/error_handling_spec.rb