Sha256: 04a0e17af9003c10ee36869f2ef9beda89f8785a028eaa0b05548ce558f14132
Contents?: true
Size: 705 Bytes
Versions: 10
Compression:
Stored size: 705 Bytes
Contents
require "spec_helper" describe Vault::Rails do describe ".serializer_for" do it "accepts a string" do serializer = Vault::Rails.serializer_for("json") expect(serializer).to be(Vault::Rails::JSONSerializer) end it "accepts a symbol" do serializer = Vault::Rails.serializer_for(:json) expect(serializer).to be(Vault::Rails::JSONSerializer) end it "raises an exception when there is no serializer for the key" do expect { Vault::Rails.serializer_for(:not_a_serializer) }.to raise_error(Vault::Rails::UnknownSerializerError) { |e| expect(e.message).to match("Unknown Vault serializer `:not_a_serializer'") } end end end
Version data entries
10 entries across 10 versions & 1 rubygems