Last active
June 7, 2016 06:34
-
-
Save YumaInaura/a706de316052bcd937ba to your computer and use it in GitHub Desktop.
Rspec | should_receive は何をしている? ref: http://qiita.com/Yinaura/items/d18658a2aff39bfb0243
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
it do | |
SomeModel.should_receive(:create) | |
SomeModel.create | |
end |
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
it do | |
SomeModel.create | |
SomeModel.should_receive(:create) | |
end |
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
it do | |
SomeModel.should_receive(:create).with)(title: 'Bible') | |
SomeModel.create(title: 'Bible') | |
end |
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
it do | |
SomeModel.should_receive(:create).with)(title: 'Bible') | |
SomeModel.create(title: 'Gone with the wind') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment