Skip to content

Conversation

carbonin
Copy link
Member

@carbonin carbonin commented Oct 5, 2015

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The split feels like it belongs in #parse_file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect #reload to clear the attr_accessors

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parse_file clears them to start. Would it look better to clear them first here?

spec/dns_spec.rb Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to avoid writing files in a spec, especially files that hold test data. In the spec, you should be able to:

allow(File).to receive(:read).and_return(original_content, new_content)

spec/dns_spec.rb Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can expect(contents).to include(new_search_order)

@bdunne
Copy link
Member

bdunne commented Oct 7, 2015

@carbonin Sorry for all the comments, but I really like where this is going. 👍

@miq-bot
Copy link
Member

miq-bot commented Oct 7, 2015

Checked commit carbonin@7ff854d with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0
3 files checked, 0 offenses detected
Everything looks good. 🍪

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two tests could also be merged in a followup PR

@bdunne
Copy link
Member

bdunne commented Oct 7, 2015

👍 LGTM, Thanks!

bdunne added a commit that referenced this pull request Oct 7, 2015
Added Dns class for managing DNS search and nameservers
@bdunne bdunne merged commit d83d9e6 into ManageIQ:master Oct 7, 2015
@carbonin carbonin deleted the add_dns_class branch November 13, 2015 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants