We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
its
Though currently I'm not sure if Transpec can determine this complex case.
The text was updated successfully, but these errors were encountered:
I ran into a problem with how the its conversion works for this code:
context 'for a nil response' do before do subject.data = nil end describe '#data' do subject { super().data } it { should be_nil } end end
Running rspec returned:
Failure/Error: subject.data = blank_response NoMethodError: undefined method `data=' for false:FalseClass
Because the before is being applied after the subject is redefined.
before
subject
My solution was just to change the spec to use this syntax, which actually I think is easier to read.
context 'for a nil response' do before do subject.data = nil end it { expect(subject.data).to be_nil } end
We use this pattern pretty often such that of the 250 or so errors on a 10k-spec suite, every one of them was an instance of this.
Sorry, something went wrong.
No branches or pull requests
Though currently I'm not sure if Transpec can determine this complex case.
The text was updated successfully, but these errors were encountered: