-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Allow let(:send) #845
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
Allow let(:send) #845
Conversation
@xaviershay Looks like the build is hitting something similar to rspec/rspec-mocks#458 ? |
|
||
it "allows let variables named 'send'" do | ||
run_result = ::RSpec::Core::ExampleGroup.describe do | ||
let(:send) { "WHAT" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably because this is a string not a symbol. If you make it :WHAT
it should pass, or rebase off my PR to fix that other issue (pretty sure that's ready to merge now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I think I see. Thanks for taking a look. (although this is not the spot where the error occurs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused...why does it matter that it's a symbol vs a string? And what does this have to do with @xaviershay's PR? It had to do with declaring a test double, but I don't see that being done here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@myronmarston It wasn't here, it was from
rspec-rails/spec/rspec/rails/mocks/mock_model_spec.rb
Lines 199 to 203 in 2325288
it "does not stub column accessor if already stubbed in declaration (with string)" do | |
model = mock_model(MockableModel, "column_a" => "a") | |
model.respond_to?("column_a") | |
model.column_a.should eq("a") | |
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it. Thanks!
The build was fixed when @xaviershay 's rspec-mocks changes got merged in. /cc @alindeman |
Should we backport this as well? |
Given that it's as bug, it would be good to backport it to 2.99 and 2.14. |
This LGTM, @soulcutter. Will leave to you to merge so you can take care of backporting it at the same time (I worry about merging and us forgetting to back port since it's not still open). |
Not sure if there was a reason that
treat_symbols_as_metadata_keys_with_true_values
was hanging around in here, so let me know if I should blow away that commit.This fixes rspec/rspec-core#1163