spec/grape/exceptions/base_spec.rb in grape-1.6.2 vs spec/grape/exceptions/base_spec.rb in grape-1.7.0
- old
+ new
@@ -1,9 +1,23 @@
# frozen_string_literal: true
-require 'spec_helper'
-
describe Grape::Exceptions::Base do
+ describe '#to_s' do
+ subject { described_class.new(message: message).to_s }
+
+ let(:message) { 'a_message' }
+
+ it { is_expected.to eq(message) }
+ end
+
+ describe '#message' do
+ subject { described_class.new(message: message).message }
+
+ let(:message) { 'a_message' }
+
+ it { is_expected.to eq(message) }
+ end
+
describe '#compose_message' do
subject { described_class.new.send(:compose_message, key, **attributes) }
let(:key) { :invalid_formatter }
let(:attributes) { { klass: String, to_format: 'xml' } }