Skip to content

Commit

Permalink
Merge 2a1a642 into 25193da
Browse files Browse the repository at this point in the history
  • Loading branch information
create-renegr committed Jul 19, 2018
2 parents 25193da + 2a1a642 commit 2619fd1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: ruby
rvm:
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.2
Expand Down
5 changes: 0 additions & 5 deletions lib/flexirest/base_without_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ class BaseWithoutValidation
attr_accessor :_etag
attr_accessor :_headers

instance_methods.each do |m|
next unless %w{display presence load require hash untrust trust freeze method enable_warnings with_warnings suppress capture silence quietly debugger breakpoint}.map(&:to_sym).include? m
undef_method m
end

def initialize(attrs={})
@attributes = {}
@dirty_attributes = Hash.new
Expand Down
12 changes: 12 additions & 0 deletions spec/lib/ruby_core_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'spec_helper'

class EmptyExample < Flexirest::BaseWithoutValidation
whiny_missing true
end

describe Flexirest::BaseWithoutValidation do
it 'should support hash resolving' do
h = {}
expect{ h[EmptyExample.new] = 'not important' }.to_not raise_error
end
end

0 comments on commit 2619fd1

Please sign in to comment.