Sha256: 6f3599133b8418def78eca3e398bcf2568b289b4d526044e5d4a28bb1dd738b5
Contents?: true
Size: 692 Bytes
Versions: 4
Compression:
Stored size: 692 Bytes
Contents
# coding: UTF-8 require 'spec_helper' describe Rescue::Controller::Flash do describe "#message" do ['default', 'rescue', 'rescue/dog'].each do |name| context "when #{{ controller: name, action: :action }}" do let(:controller) do clazz = Class.new clazz.stub(:controller_path).and_return(name) clazz.stub(:controller_name).and_return(name) clazz.stub(:action_name).and_return(:action) clazz end [:success, :error].each do |status| it do expect(Rescue::Controller::Flash.message(controller, status)).to eq("#{name} #{status}") end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems