Last active
June 5, 2018 19:51
-
-
Save Sparkmasterflex/9e37fa0ae48cefd41f7f055b7e26203b to your computer and use it in GitHub Desktop.
Rspec Allow/Receive do block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
specify "my super awesome test here" do | |
nested_value = "my awesome string" | |
allow(model).to receive(:method) do |arg| | |
expect(arg).to include(:nested_key) | |
expect(arg[:nested_key]).to eq nested_value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment