Implement procedure cloning

This commit is contained in:
Guillaume Lazzara 2016-06-15 11:34:05 +02:00
parent 7fd2aa40ca
commit 7af7859334
10 changed files with 113 additions and 1 deletions

View file

@ -113,4 +113,11 @@ RSpec.configure do |config|
end
end
}
RSpec::Matchers.define :have_same_attributes_as do |expected|
match do |actual|
ignored = [:id, :procedure_id, :updated_at, :created_at]
actual.attributes.with_indifferent_access.except(*ignored) == expected.attributes.with_indifferent_access.except(*ignored)
end
end
end