Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should have(:no).errors_on(:foo) conversion bug #95

Closed
tom-lord opened this issue Dec 11, 2014 · 1 comment
Closed

should have(:no).errors_on(:foo) conversion bug #95

tom-lord opened this issue Dec 11, 2014 · 1 comment

Comments

@tom-lord
Copy link

Transpec converts the following:

it{ should have(:no).errors_on(:foo) }

Into:

it'has :no errors_on' do
  expect(subject.errors_on(:foo).size).to eq(:no)
end

This is a (simple) bug. The correct conversion should be something like:

it'has 0 errors_on' do
  expect(subject.errors_on(:foo).size).to eq(0)
end

I don't have time right now, but I'll fix it in the next couple of days if no one else beat me to it 😛

@yujinakayama
Copy link
Owner

Thanks for the report.

Yes, it's a bug but not about the auto-generated description. In fact, the have(n).errors_on(attr) should not be converted by Transpec. Please see the rationale in the README.

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

No branches or pull requests

2 participants