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

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/hashie-3.6.0/spec/hashie/utils_spec.rb
hashie-4.0.0 spec/hashie/utils_spec.rb
hashie-3.6.0 spec/hashie/utils_spec.rb
tdiary-5.0.8 vendor/bundle/gems/hashie-3.5.7/spec/hashie/utils_spec.rb
hashie-3.5.7 spec/hashie/utils_spec.rb
hashie-3.5.6 spec/hashie/utils_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/hashie-3.5.5/spec/hashie/utils_spec.rb
tdiary-5.0.5 vendor/bundle/gems/hashie-3.5.5/spec/hashie/utils_spec.rb
tdiary-5.0.4 vendor/bundle/gems/hashie-3.5.5/spec/hashie/utils_spec.rb
hashie-3.5.5 spec/hashie/utils_spec.rb
hashie-3.5.4 spec/hashie/utils_spec.rb
hashie-3.5.3 spec/hashie/utils_spec.rb
hashie-3.5.2 spec/hashie/utils_spec.rb
hashie-3.5.1 spec/hashie/utils_spec.rb
hashie-3.5.0 spec/hashie/utils_spec.rb