Sha256: d323c3175854f5be98905d38b92f645d63ad2b9eb8ac779146defde8d6249b41

Contents?: true

Size: 627 Bytes

Versions: 14

Compression:

Stored size: 627 Bytes

Contents

class Teabag::SpecController < ActionController::Base
  helper Teabag::SpecHelper rescue nil

  layout false

  unless Rails.application.config.assets.debug
    rescue_from Teabag::AssetNotServable, with: :javascript_exception
  end

  def index
    @suite = Teabag::Suite.new(params[:suite])
  end

  def fixtures
    prepend_view_path Teabag.configuration.root.join(Teabag.configuration.fixture_path)
    render "/#{params[:filename]}"
  end

  private

  def javascript_exception(exception)
    err  = "#{exception.class.name}: #{exception.message}"
    render text: "<script>throw Error(#{err.inspect})</script>"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
teabag-0.4.6 app/controllers/teabag/spec_controller.rb
teabag-0.4.5 app/controllers/teabag/spec_controller.rb
teabag-0.4.4 app/controllers/teabag/spec_controller.rb
teabag-0.4.3 app/controllers/teabag/spec_controller.rb
teabag-0.4.2 app/controllers/teabag/spec_controller.rb
teabag-0.4.1 app/controllers/teabag/spec_controller.rb
teabag-0.4.0 app/controllers/teabag/spec_controller.rb
teabag-0.3.6 app/controllers/teabag/spec_controller.rb
teabag-0.3.5 app/controllers/teabag/spec_controller.rb
teabag-0.3.4 app/controllers/teabag/spec_controller.rb
teabag-0.3.3 app/controllers/teabag/spec_controller.rb
teabag-0.3.2 app/controllers/teabag/spec_controller.rb
teabag-0.3.1 app/controllers/teabag/spec_controller.rb
teabag-0.3.0 app/controllers/teabag/spec_controller.rb