Created
January 15, 2016 08:53
-
-
Save YumaInaura/1eeed62daa430d2468d6 to your computer and use it in GitHub Desktop.
Rspec | named_let は match_array / contain_exactly には効かない ref: http://qiita.com/Yinaura/items/19feab1cfc184cdfbf00
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
| rspec -fd test_spec.rb |
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
| should contain exactly #<Object:0x007fcb73c525b0> and #<Object:0x007fcb73c52588> | |
| Finished in 0.90819 seconds (files took 11.2 seconds to load) | |
| 1 example, 0 failures |
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
| require 'spec_helper' | |
| describe do | |
| subject { [Object.new, Object.new] } | |
| named_let(:instances) { subject } | |
| it { should contain_exactly(*instances) } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment