Skip to content

Commit

Permalink
Fix undefine_attribute_methods spec
Browse files Browse the repository at this point in the history
  • Loading branch information
adzap committed Jan 7, 2016
1 parent 1530517 commit 35caf36
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions spec/validates_timeliness/orm/active_record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,14 @@ class EmployeeWithParser < ActiveRecord::Base
end

context "undefine_attribute_methods" do
it "returns a falsy value if the attribute methods have already been generated" do
expect { Employee.undefine_attribute_methods }.to_not raise_error
it "returns remove attribute methods that have already been generated" do
Employee.define_attribute_methods

expect(Employee.instance_methods).to include(:birth_datetime)

Employee.undefine_attribute_methods

expect(Employee.instance_methods).to_not include(:birth_datetime)
end
end
end

0 comments on commit 35caf36

Please sign in to comment.