Skip to content

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

Merged
merged 2 commits into from
Nov 13, 2013
Merged

Allow let(:send) #845

merged 2 commits into from
Nov 13, 2013

Conversation

soulcutter
Copy link
Member

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

@soulcutter
Copy link
Member Author

@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" }
Copy link
Member

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).

Copy link
Member Author

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)

Copy link
Member

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...

Copy link
Member Author

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

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

Copy link
Member

Choose a reason for hiding this comment

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

Ah, got it. Thanks!

@soulcutter
Copy link
Member Author

The build was fixed when @xaviershay 's rspec-mocks changes got merged in.

/cc @alindeman

@soulcutter
Copy link
Member Author

Should we backport this as well?

@myronmarston
Copy link
Member

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.

@myronmarston
Copy link
Member

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).

soulcutter added a commit that referenced this pull request Nov 13, 2013
@soulcutter soulcutter merged commit e86b80f into master Nov 13, 2013
@soulcutter soulcutter deleted the allow-let-send branch November 13, 2013 01:59
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.

Internal use of send
3 participants