Sha256: 0408976697a78866d350da13f7dd757a477c8c0e22569ebc93270c607c67457a
Contents?: true
Size: 449 Bytes
Versions: 26
Compression:
Stored size: 449 Bytes
Contents
require 'spec_helper' describe AngularSprinkles::ObjectKeyWrapper do let(:wrapper1) { ->(a) { "%%#{a}%%" } } let(:wrapper2) { ->(a, b) { "#{a}+#{b}" } } let(:arg1) { "a" } let(:arg2) { "b" } it 'wraps objects on #to_json' do json1 = described_class.new(arg1, wrapper1).to_json expect(json1).to eq("%%#{arg1}%%") json2 = described_class.new(arg1, arg2, wrapper2).to_json expect(json2).to eq("#{arg1}+#{arg2}") end end
Version data entries
26 entries across 26 versions & 1 rubygems