ホーム > 今日のテストコード > rspecのincludeマッチャ

rspecのincludeマッチャ

rspecのincludeマッチャ。Hashの場合の挙動はバージョン間で色々と違いがありますね。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'rubygems'
gem 'rspec', '>= 1.1.12'
require 'spec'
 
describe 'includeマッチャ' do
 
  before :each do
    @lang_authors = { 
      :ruby => 'まつもとゆきひろ',
      :python => 'Guido van Rossum',
      :perl => 'Larry Wall'
    }
  end
 
  it 'Hashが指定されたキーを持つか' do
    # 以下はrspec 1.1.10, 1.1.11 でエラーになる
    @lang_authors.should include(:ruby)
    @lang_authors.should include(:python)
    @lang_authors.should_not include(:vb)
  end
 
  it 'Hashが指定されたキーと値の組み合わせを持つか' do
    # 以下はrspec 1.1.10より前だと失敗する
    @lang_authors.should include(:ruby => 'まつもとゆきひろ')
    @lang_authors.should_not include(:ruby => 'まつもとひろゆき')
  end
 
  it 'その他はinclude?による評価' do
    @lang_authors[:python].should include('os')
    @lang_authors.keys.should include(:perl)
  end
 
end

参考:

  1. 2020 年 6 月 29 日 05:50 | #1

    An impressive share! I’ve just forwarded this onto a co-worker who was conducting a little homework on this. And he in fact ordered me dinner because I found it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending time to discuss this subject here on your website.

  2. 2020 年 6 月 29 日 05:52 | #2

    I really like it when people come together and share views. Great blog, stick with it!

  3. 2020 年 6 月 29 日 05:55 | #3

    After I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I get four emails with the exact same comment. There has to be an easy method you can remove me from that service? Appreciate it!

  4. Candy Pulica
    2020 年 6 月 29 日 05:58 | #4

    This is a very captivating post. Hinder my purlieus free account generator fortnite

  5. 2020 年 6 月 29 日 06:22 | #5

    Howdy! This article couldn’t be written any better! Going through this article reminds me of my previous roommate! He always kept preaching about this. I am going to send this information to him. Pretty sure he’s going to have a good read. Thanks for sharing!

  6. 2020 年 6 月 29 日 06:35 | #6

    You’ve made some decent points there. I checked on the web for more information about the issue and found most individuals will go along with your views on this website.

  7. 2020 年 6 月 29 日 06:36 | #7

    A motivating discussion is worth comment. I believe that you need to publish more on this issue, it might not be a taboo subject but generally people do not speak about these subjects. To the next! Cheers!!

  8. 2020 年 6 月 29 日 06:51 | #8

    After I originally left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and now every time a comment is added I recieve four emails with the exact same comment. There has to be an easy method you are able to remove me from that service? Appreciate it.

  9. Johnny Ioni
    2020 年 6 月 29 日 08:11 | #9

    This is a very compelling post. Report register my purlieus free account generator fortnite

  10. Johnny Shovo
    2020 年 6 月 29 日 10:23 | #10

    This is a very compelling post. Hinder my purlieus fortnite account generator

  11. 2020 年 6 月 29 日 11:51 | #11

    We are a gaggle of volunteers and opening a brand new scheme in our community.
    Your web site provided us with helpful info to work on. You have
    done an impressive process and our entire neighborhood will
    probably be thankful to you.

  12. 2020 年 6 月 29 日 12:36 | #12

    Saved as a favorite, I really like your website!

  13. Johnny Danco
    2020 年 6 月 29 日 12:36 | #13

    This is a extremely fascinating post. Thwart my locate fortnite account generator

  14. 2020 年 6 月 29 日 12:41 | #14

    Spot on with this write-up, I actually think this site needs a great deal more attention. I’ll probably be returning to read through more, thanks for the advice!

  15. 2020 年 6 月 29 日 13:03 | #15

    Excellent blog post. I definitely appreciate this website. Thanks!

  16. 2020 年 6 月 29 日 13:22 | #16

    Hello there! I could have sworn I’ve visited this site before but after browsing through a few of the articles I realized it’s new to me. Regardless, I’m definitely pleased I came across it and I’ll be bookmarking it and checking back frequently!

  17. 2020 年 6 月 29 日 13:29 | #17

    I need to to thank you for this good read!! I absolutely enjoyed every bit of it. I have you saved as a favorite to check out new things you post…

  18. 2020 年 6 月 29 日 13:30 | #18

    You should be a part of a contest for one of the best websites on the internet. I’m going to highly recommend this site!

  19. 2020 年 6 月 29 日 13:58 | #19

    An intriguing discussion is worth comment. I believe that you need to publish more about this issue, it may not be a taboo subject but usually folks don’t discuss these topics. To the next! Kind regards.

  20. 2020 年 6 月 29 日 14:40 | #20

    Having read this I believed it was extremely enlightening. I appreciate you taking the time and effort to put this short article together. I once again find myself spending a lot of time both reading and commenting. But so what, it was still worth it!

  21. 2020 年 6 月 29 日 14:46 | #21

    There is certainly a great deal to learn about this issue. I like all of the points you made.

  22. 2020 年 6 月 29 日 14:47 | #22

    The next time I read a blog, Hopefully it doesn’t fail me as much as this one. After all, Yes, it was my choice to read through, but I genuinely believed you would have something useful to talk about. All I hear is a bunch of complaining about something you could possibly fix if you weren’t too busy looking for attention.

  23. Johnny Pulica
    2020 年 6 月 29 日 14:50 | #23

    This is a jolly compelling post. Report register my site fortnite account generator

  24. 2020 年 6 月 29 日 15:13 | #24

    Very good info. Lucky me I found your website by accident (stumbleupon). I’ve bookmarked it for later!

  25. 2020 年 6 月 29 日 15:14 | #25

    You need to take part in a contest for one of the greatest sites on the internet. I am going to highly recommend this website!

  26. 2020 年 6 月 29 日 15:15 | #26

    I love looking through a post that will make men and women think. Also, many thanks for permitting me to comment!

  27. 2020 年 6 月 29 日 15:48 | #27

    You should be a part of a contest for one of the greatest websites on the web. I most certainly will recommend this web site!

  28. 2020 年 6 月 29 日 15:55 | #28

    An intriguing discussion is worth comment. I do think that you should write more on this subject matter, it may not be a taboo matter but usually people don’t speak about such issues. To the next! Cheers!!

  29. 2020 年 6 月 29 日 16:14 | #29

    Your style is unique in comparison to other folks I have read stuff from. Thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this blog.

  30. 2020 年 6 月 29 日 16:26 | #30

    Greetings! Very helpful advice within this post! It is the little changes which will make the greatest changes. Thanks for sharing!

  31. 2020 年 6 月 29 日 16:32 | #31

    Pretty! This was an incredibly wonderful post. Thanks for providing these details.

  32. 2020 年 6 月 29 日 16:36 | #32

    Spot on with this write-up, I honestly think this website needs a great deal more attention. I’ll probably be returning to read through more, thanks for the information!

  33. 2020 年 6 月 29 日 16:39 | #33

    The next time I read a blog, I hope that it won’t fail me just as much as this particular one. I mean, Yes, it was my choice to read through, but I truly thought you would probably have something helpful to say. All I hear is a bunch of complaining about something you could possibly fix if you weren’t too busy looking for attention.

  34. 2020 年 6 月 29 日 16:44 | #34

    An outstanding share! I’ve just forwarded this onto a colleague who was doing a little homework on this. And he actually ordered me dinner due to the fact that I found it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending time to talk about this issue here on your site.

  35. Genny Ioni
    2020 年 6 月 29 日 17:05 | #35

    This is a very compelling post. Hinder my locate fortnite free account generator

  36. 2020 年 6 月 29 日 17:41 | #36

    An outstanding share! I have just forwarded this onto a colleague who has been doing a little homework on this. And he actually bought me lunch due to the fact that I stumbled upon it for him… lol. So let me reword this…. Thanks for the meal!! But yeah, thanks for spending time to talk about this matter here on your internet site.

  37. 2020 年 6 月 29 日 17:48 | #37

    I blog quite often and I seriously appreciate your content. Your article has really peaked my interest. I will take a note of your site and keep checking for new details about once a week. I subscribed to your RSS feed as well.

  38. 2020 年 6 月 29 日 17:55 | #38

    Howdy! I could have sworn I’ve visited your blog before but after browsing through some of the articles I realized it’s new to me. Regardless, I’m definitely pleased I found it and I’ll be bookmarking it and checking back frequently!

  39. 2020 年 6 月 29 日 18:13 | #39

    Right here is the perfect blog for anyone who wishes to find out about this topic. You realize so much its almost tough to argue with you (not that I personally will need to…HaHa). You definitely put a new spin on a topic that has been written about for a long time. Great stuff, just great!

  40. 2020 年 6 月 29 日 18:26 | #40

    Way cool! Some extremely valid points! I appreciate you penning this article plus the rest of the site is really good.

  41. 2020 年 6 月 29 日 18:41 | #41

    You’re so awesome! I do not suppose I’ve truly read something like this before. So wonderful to discover someone with a few genuine thoughts on this issue. Seriously.. thanks for starting this up. This website is one thing that is needed on the internet, someone with some originality!

  42. 2020 年 6 月 29 日 19:05 | #42

    Pretty! This was an extremely wonderful article. Many thanks for providing this information.

  43. 2020 年 6 月 29 日 19:06 | #43

    This website was… how do you say it? Relevant!! Finally I’ve found something which helped me. Thank you!

  44. Candy Shovo
    2020 年 6 月 29 日 19:17 | #44

    This is a very compelling post. Thwart my site free account generator fortnite

  45. 2020 年 6 月 29 日 19:17 | #45

    This web site certainly has all of the information I wanted concerning this subject and didn’t know who to ask.

  46. 2020 年 6 月 29 日 19:18 | #46

    bookmarked!!, I love your web site!

  47. 2020 年 6 月 29 日 19:20 | #47

    Your style is so unique in comparison to other folks I have read stuff from. Thanks for posting when you have the opportunity, Guess I will just bookmark this site.

  48. 2020 年 6 月 29 日 19:21 | #48

    Hello there! This article couldn’t be written much better! Going through this post reminds me of my previous roommate! He constantly kept talking about this. I’ll send this article to him. Pretty sure he’s going to have a very good read. I appreciate you for sharing!

  49. 2020 年 6 月 29 日 19:25 | #49

    Way cool! Some very valid points! I appreciate you writing this post plus the rest of the website is really good.

  50. 2020 年 6 月 29 日 20:20 | #50

    Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our area library but I think I learned more from this post. I am very glad to see such magnificent information being shared freely out there.

コメントページ
1 90 91 92 93 94 102 344
  1. 2020 年 4 月 14 日 19:42 | #1
  2. 2020 年 4 月 20 日 11:24 | #2
  3. 2020 年 4 月 26 日 04:06 | #3
  4. 2020 年 4 月 26 日 09:54 | #4
  5. 2020 年 4 月 30 日 00:35 | #5
  6. 2020 年 5 月 5 日 14:56 | #6
  7. 2020 年 5 月 5 日 19:12 | #7
  8. 2020 年 5 月 10 日 00:44 | #8
  9. 2020 年 6 月 30 日 00:36 | #9