Add language attribute to KalibroConfiguration#110
Conversation
|
Nice work. Just missed the CHANGELOG :) |
|
|
||
| describe KalibroClient::Entities::Configurations::KalibroConfiguration do | ||
| describe 'accessors' do | ||
| it 'should have accessors for the needed attributes' do |
There was a problem hiding this comment.
Aren't we just testing the way ruby is supposed to work here?
If this is for documentation purposes (which I think is good), maybe we should consider printing more specific messages.
What do you think of:
[:name, :description, :language].each do |attr|
it "should have accessors for the #{attr} attribute" do
expect(subject).to have_attr_accessor(attr)
end
endCaveat: I'm not entirely sure that code snippet works 🍷
There was a problem hiding this comment.
The test is just to ensure the methods are defined. It doesn't check where
they actually work. I thought it was interesting, since it is the defining
part of the change, and defines the API.
The have_attr_accessor matcher unfortunately isn't part of rspec, but I
imported it from a StackOverflow answer.
Em sáb, 4 de jun de 2016 21:57, Eduardo Silva notifications@github.com
escreveu:
In spec/entities/configurations/kalibro_configuration_spec.rb
#110 (comment):@@ -17,6 +17,14 @@
require 'spec_helper'describe KalibroClient::Entities::Configurations::KalibroConfiguration do
- describe 'accessors' do
- it 'should have accessors for the needed attributes' do
It does :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mezuro/kalibro_client/pull/110/files/70427ae757120cfd73f7e51077190a42b8010cfe#r65809835,
or mute the thread
https://github.com/notifications/unsubscribe/AAtnTnZwp_Rica8ZCWBvV5DK7fOtqWP1ks5qIh7igaJpZM4IqDsX
.
There was a problem hiding this comment.
So that reinforces my opinion that we should use the code snippet I wrote.
Thanks for checking that it works, @dread-uo!
Since we use tests as documentation, it is nice to have more informative messages.
Signed-off-by: Daniel Miranda <danielkza2@gmail.com>
e590f6d to
bd78b44
Compare
Fixes #109.