comma-csv / comma

Comma is a small CSV (ie. comma separated values) generation extension for Ruby objects, that lets you seamlessly define a CSV output format via a small DSL

Home Page:https://github.com/comma-csv/comma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails/RSpec/Capybara: Test raises "Missing template errors/internal_server_error}

jmuheim opened this issue · comments

The CSV export is working nicely, but when trying to test it, I get the following error:

Error during failsafe response: Missing template errors/internal_server_error with {:locale=>[:en], :formats=>[:csv], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :slim, :jbuilder, :coffee, :haml]}.

The spec looks like this:

require 'rails_helper'

describe 'Exporting findings' do
  it 'exports findings to CSV' do
    @project = create :project

    visit project_path(@project)
    click_link 'Export to CSV'

    # Error raised!
  end
end

FindingsController:

class FindingsController < InheritedResources::Base
  load_and_authorize_resource
  belongs_to :project
  respond_to :csv
end

Interestingly, the spec passes anyway:

Finished in 0.76275 seconds (files took 0.36499 seconds to load)
1 example, 0 failures

I am sorry, but I cannot see how comma gem is related to this problem. So, I am closing this issue. If comma gem is related, please re-open this issue and explain how comma gem is used. Thank you.