Sha256: 74d147a7de86c72fd745bc81ffdeb95b490eb4469b2991b743c8d2fece98b013
Contents?: true
Size: 880 Bytes
Versions: 9
Compression:
Stored size: 880 Bytes
Contents
# coding: UTF-8 require 'spec_helper' describe Rescue::Controller::Static do let(:object) { StaticController.new } describe "respond method" do it "expects to be called in a subclass of ApplicationController" do expect(object.methods.include? Rescue.config.respond_name).to be_true end end TestCase::Controller::ERRORS.each do |name, code| describe "response when raise #{name}" do TestCase::Controller::FORMATS.each do |format| context "request format => #{format}" do before do visit "/static/#{name.to_s.underscore}.#{format.to_sym}" end it { expect(page).to have_content name.to_s.gsub(/([A-Z]+)([A-Z][a-z])/,'\1 \2').gsub(/([a-z\d])([A-Z])/,'\1 \2') } it { expect(response_headers["Content-Type"]).to include(format.to_s) } end end end end ## end each end
Version data entries
9 entries across 9 versions & 1 rubygems