Sha256: ad7d9933afa357b39be8220cc215fc33b185511572e28d110f933b9a84b23b6d
Contents?: true
Size: 625 Bytes
Versions: 15
Compression:
Stored size: 625 Bytes
Contents
require 'spec_helper' def a_method_to_match_against 'Hello world!' end RSpec.describe Hashie::Utils do describe '.method_information' do it 'states the module or class that a native method was defined in' do bound_method = method(:trust) message = Hashie::Utils.method_information(bound_method) expect(message).to match('Kernel') end it 'states the line a Ruby method was defined at' do bound_method = method(:a_method_to_match_against) message = Hashie::Utils.method_information(bound_method) expect(message).to match('spec/hashie/utils_spec.rb') end end end
Version data entries
15 entries across 14 versions & 3 rubygems