Skip to content

Conversation

@railsmechanic
Copy link

Added fix for valid? method to return boolean type


describe '#valid?' do
it { should be_valid }
it { expect([true, false]).to include(subject.valid?) }

Choose a reason for hiding this comment

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

What do you think about splitting this in two tests: asserting that valid? returns true when the Bic is valid and false otherwise?

Copy link
Author

Choose a reason for hiding this comment

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

Ok, but I think the shorter form does the same job, as it "expects that the return value of that function is either true or false". Any other value will not pass.

Is it about readability?

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.

2 participants