Sha256: 4a90c7a846c36d907936671a164940b852a7106eeb586e6af2a1d5c903e4aae9
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true RSpec.describe MessagesDictionary do let(:dummy) { Class.new { include MessagesDictionary } } it 'includes the necessary methods' do dummy.class_eval do has_messages_dictionary messages: {parent: {child: 'child_string'}} define_method :run do pou('parent.child', &:upcase) end end object = dummy.new expect(object.send(:pou, 'parent.child') { |msg| msg }).to eq('child_string') expect(object.send(:pretty_output, 'parent.child') { |msg| msg }).to eq('child_string') expect(object.run).to eq('CHILD_STRING') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
messages_dictionary-2.1.0 | spec/lib/messages_dictionary_spec.rb |
messages_dictionary-2.0.0 | spec/lib/messages_dictionary_spec.rb |