Skip to content

Conversation

@kaspth
Copy link
Contributor

@kaspth kaspth commented Mar 23, 2014

It was a pain to keep figuring out if we we're dealing with a Node or NodeSet. So polymorphism 😄

There might be a problem if users ever pass in an array of elements (instead of a NodeSet).
For instance using an Enumerable method like map returns an array.
Which could confuse people... but then again why would they do that, when they already have assert_select to pick out elements?

Which is why I've removed the is_a?(Array) checks. It's easy to make sure we have a node set when needed.

@rafaelfranca

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't really see the point of this message being so specific? It just makes duck typing here harder.
@rafaelfranca

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it was a little much to make it a full-blown object.
Ok? @rafaelfranca

Copy link
Member

Choose a reason for hiding this comment

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

Ok.

@rafaelfranca
Copy link
Member

:shipit:

kaspth added a commit that referenced this pull request Mar 25, 2014
@kaspth kaspth merged commit a7ea2ca into master Mar 25, 2014
@kaspth kaspth deleted the tidy-assert-encoded branch March 25, 2014 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants