ホーム > 今日のテストコード > 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 年 7 月 31 日 02:31 | #1

    Nice post. I learn something new and challenging on sites I stumbleupon everyday. It’s always helpful to read through content from other writers and use something from other websites.

  2. 2020 年 7 月 31 日 02:39 | #2

    That is a great tip particularly to those new to the blogosphere. Brief but very precise info… Thanks for sharing this one. A must read post!

  3. 2020 年 7 月 31 日 03:24 | #3

    An intriguing discussion is worth comment. I believe that you need to write more about this subject, it may not be a taboo subject but typically people don’t talk about such issues. To the next! Cheers!!

  4. 2020 年 7 月 31 日 03:27 | #4

    Your style is so unique compared to other folks I have read stuff from. Thanks for posting when you have the opportunity, Guess I will just book mark this page.

  5. 2020 年 7 月 31 日 04:46 | #5

    I blog often and I genuinely appreciate your content. Your article has really peaked my interest. I am going to take a note of your website and keep checking for new information about once per week. I subscribed to your RSS feed too.

  6. 2020 年 7 月 31 日 04:55 | #6

    I was pretty pleased to discover this page. I need to to thank you for ones time due to this fantastic read!! I definitely savored every little bit of it and i also have you saved to fav to see new information on your blog.

  7. 2020 年 7 月 31 日 05:21 | #7

    I was able to find good info from your articles.

  8. 2020 年 7 月 31 日 05:29 | #8

    This website really has all the info I wanted concerning this subject and didn’t know who to ask.

  9. 2020 年 7 月 31 日 06:14 | #9

    Way cool! Some extremely valid points! I appreciate you penning this article and the rest of the website is also very good.

  10. 2020 年 7 月 31 日 06:38 | #10

    Good day! I could have sworn I’ve been to this site before but after going through many of the posts I realized it’s new to me. Nonetheless, I’m certainly pleased I stumbled upon it and I’ll be book-marking it and checking back frequently!

  11. 2020 年 7 月 31 日 06:43 | #11

    Having read this I believed it was really informative. I appreciate you spending some time and energy to put this informative article together. I once again find myself spending a lot of time both reading and commenting. But so what, it was still worthwhile!

  12. 2020 年 7 月 31 日 06:45 | #12

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

  13. 2020 年 7 月 31 日 12:58 | #13

    Howdy! This article couldn’t be written much better! Looking at this article reminds me of my previous roommate! He continually kept preaching about this. I will send this information to him. Pretty sure he’s going to have a great read. I appreciate you for sharing!

  14. 2020 年 7 月 31 日 13:03 | #14

    Oh my goodness! Incredible article dude! Thank you, However I am encountering difficulties with your RSS. I don’t understand why I am unable to subscribe to it. Is there anyone else having the same RSS problems? Anyone who knows the solution can you kindly respond? Thanx!!

  15. 2020 年 7 月 31 日 13:34 | #15

    Greetings! Very useful advice in this particular post! It’s the little changes that produce the largest changes. Many thanks for sharing!

  16. 2020 年 7 月 31 日 13:41 | #16

    I’m amazed, I have to admit. Rarely do I encounter a blog that’s equally educative and engaging, and let me tell you, you have hit the nail on the head. The issue is something which not enough men and women are speaking intelligently about. I’m very happy I found this in my hunt for something relating to this.

  17. 2020 年 7 月 31 日 14:07 | #17

    Saved as a favorite, I really like your website!

  18. 2020 年 7 月 31 日 14:09 | #18

    I love reading a post that will make people think. Also, many thanks for allowing me to comment!

  19. 2020 年 7 月 31 日 14:29 | #19

    You’re so interesting! I don’t think I’ve read through something like this before. So nice to discover someone with some unique thoughts on this issue. Really.. thanks for starting this up. This web site is something that’s needed on the web, someone with some originality!

  20. 2020 年 7 月 31 日 14:51 | #20

    This is a good tip especially to those new to the blogosphere. Short but very precise information… Appreciate your sharing this one. A must read post!

  21. 2020 年 7 月 31 日 14:56 | #21

    Hi there! This post could not be written any better! Looking through this article reminds me of my previous roommate! He always kept preaching about this. I’ll send this information to him. Fairly certain he’s going to have a good read. Thank you for sharing!

  22. 2020 年 7 月 31 日 14:59 | #22

    Hi there! I could have sworn I’ve visited this site before but after going through some of the articles I realized it’s new to me. Anyhow, I’m certainly pleased I found it and I’ll be bookmarking it and checking back frequently!

  23. 2020 年 7 月 31 日 15:01 | #23

    That is a good tip particularly to those fresh to the blogosphere. Brief but very precise information… Thank you for sharing this one. A must read article!

  24. 2020 年 7 月 31 日 18:27 | #24

    Hi, I do think this is an excellent site. I stumbledupon it ;) I will revisit once again since I bookmarked it. Money and freedom is the greatest way to change, may you be rich and continue to guide other people.

  25. 2020 年 7 月 31 日 19:21 | #25

    An outstanding share! I’ve just forwarded this onto a coworker who has been conducting a little homework on this. And he actually bought me lunch because I stumbled upon it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanx for spending the time to discuss this matter here on your site.

  26. 2020 年 7 月 31 日 19:33 | #26

    This is a really good tip especially to those new to the blogosphere. Simple but very precise info… Appreciate your sharing this one. A must read article!

  27. 2020 年 7 月 31 日 19:33 | #27

    I couldn’t resist commenting. Exceptionally well written!

  28. 2020 年 7 月 31 日 19:50 | #28

    Having read this I thought it was rather informative. I appreciate you finding the time and effort to put this content together. I once again find myself spending a lot of time both reading and commenting. But so what, it was still worth it!

  29. 2020 年 7 月 31 日 19:56 | #29

    An intriguing discussion is worth comment. I do think that you should publish more about this subject, it may not be a taboo subject but usually people do not talk about these issues. To the next! Best wishes!!

  30. 2020 年 7 月 31 日 20:30 | #30

    prednisone 10 mg https://bvsinfotech.com/

  31. 2020 年 7 月 31 日 20:40 | #31

    Hi there! This blog post could not be written any better! Looking at this article reminds me of my previous roommate! He continually kept talking about this. I will send this article to him. Fairly certain he’ll have a good read. Thanks for sharing!

  32. 2020 年 8 月 1 日 00:36 | #32

    Hi, I do think this is a great site. I stumbledupon it ;) I’m going to revisit yet again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to guide other people.

  33. 2020 年 8 月 1 日 01:02 | #33

    The next time I read a blog, I hope that it doesn’t disappoint me as much as this one. After all, Yes, it was my choice to read through, nonetheless I genuinely thought you’d have something interesting to talk about. All I hear is a bunch of whining about something you could fix if you weren’t too busy searching for attention.

  34. 2020 年 8 月 1 日 01:14 | #34

    It’s hard to find knowledgeable people for this topic, however, you seem like you know what you’re talking about! Thanks

  35. 2020 年 8 月 1 日 01:14 | #35

    Very good information. Lucky me I came across your blog by accident (stumbleupon). I’ve bookmarked it for later!

  36. 2020 年 8 月 1 日 02:07 | #36

    This website was… how do I say it? Relevant!! Finally I have found something which helped me. Thanks a lot!

  37. 2020 年 8 月 1 日 02:13 | #37

    You are so awesome! I don’t think I’ve read through anything like that before. So great to discover someone with a few unique thoughts on this subject. Really.. many thanks for starting this up. This web site is something that is required on the internet, someone with a little originality!

  38. 2020 年 8 月 1 日 02:21 | #38

    Hello there! I simply would like to give you a huge thumbs up for your excellent information you have got right here on this post. I am coming back to your web site for more soon.

  39. 2020 年 8 月 1 日 02:39 | #39

    This page definitely has all of the info I needed concerning this subject and didn’t know who to ask.

  40. 2020 年 8 月 1 日 05:01 | #40

    My husband and i have been now relieved when Louis managed to carry out his studies while using the ideas he received when using the site. It’s not at all simplistic to simply find yourself releasing steps which usually other people may have been trying to sell. And we do understand we need the blog owner to be grateful to because of that. Most of the illustrations you have made, the easy website menu, the friendships you will help promote – it is all overwhelming, and it’s aiding our son and the family imagine that the subject matter is amusing, which is highly mandatory. Thank you for everything!

  41. 2020 年 8 月 1 日 12:34 | #41

    Aw, this was an extremely nice post. Taking a few minutes and actual effort to generate a great article… but what can I say… I put things off a whole lot and don’t seem to get anything done.

  42. 2020 年 8 月 1 日 13:11 | #42

    I used to be able to find good information from your blog posts.

  43. 2020 年 8 月 1 日 13:11 | #43

    Oh my goodness! Impressive article dude! Thanks, However I am going through problems with your RSS. I don’t know the reason why I am unable to join it. Is there anybody getting the same RSS problems? Anyone that knows the solution can you kindly respond? Thanks!!

  44. 2020 年 8 月 1 日 14:01 | #44

    It’s hard to come by experienced people on this subject, but you sound like you know what you’re talking about! Thanks

  45. 2020 年 8 月 1 日 14:06 | #45

    This site was… how do I say it? Relevant!! Finally I have found something which helped me. Cheers!

  46. 2020 年 8 月 1 日 14:27 | #46

    I enjoy reading a post that will make men and women think. Also, thank you for permitting me to comment!

  47. 2020 年 8 月 1 日 14:32 | #47

    Greetings! Very helpful advice in this particular post! It’s the little changes that produce the biggest changes. Many thanks for sharing!

  48. 2020 年 8 月 1 日 15:38 | #48

    Greetings! Very helpful advice in this particular article! It’s the little changes that produce the largest changes. Many thanks for sharing!

  49. 2020 年 8 月 1 日 16:12 | #49

    May I simply say what a relief to discover someone that actually understands what they’re discussing on the net. You certainly know how to bring an issue to light and make it important. More people really need to check this out and understand this side of the story. I was surprised that you’re not more popular because you most certainly possess the gift.

  50. 2020 年 8 月 1 日 16:13 | #50

    Pretty! This was a really wonderful post. Thanks for supplying these details.

コメントページ
1 127 128 129 130 131 141 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
  10. 2020 年 7 月 11 日 18:18 | #10
  11. 2020 年 7 月 19 日 08:12 | #11
  12. 2020 年 7 月 23 日 13:36 | #12
  13. 2020 年 7 月 24 日 15:13 | #13
  14. 2020 年 7 月 26 日 19:30 | #14
  15. 2020 年 7 月 30 日 02:39 | #15
  16. 2020 年 7 月 30 日 09:32 | #16
  17. 2020 年 8 月 5 日 02:49 | #17
  18. 2020 年 8 月 6 日 17:10 | #18
  19. 2020 年 8 月 6 日 20:26 | #19
  20. 2020 年 8 月 6 日 22:52 | #20
  21. 2020 年 8 月 7 日 06:34 | #21
  22. 2020 年 8 月 8 日 18:57 | #22
  23. 2020 年 8 月 9 日 18:49 | #23
  24. 2020 年 8 月 9 日 23:00 | #24
  25. 2020 年 8 月 9 日 23:41 | #25
  26. 2020 年 8 月 10 日 00:54 | #26
  27. 2020 年 8 月 10 日 00:58 | #27
  28. 2020 年 8 月 10 日 04:59 | #28
  29. 2020 年 8 月 10 日 05:28 | #29
  30. 2020 年 8 月 10 日 06:33 | #30
  31. 2020 年 8 月 10 日 08:31 | #31
  32. 2020 年 8 月 10 日 10:10 | #32
  33. 2020 年 8 月 10 日 11:39 | #33
  34. 2020 年 8 月 10 日 11:51 | #34
  35. 2020 年 8 月 10 日 14:46 | #35
  36. 2020 年 8 月 10 日 16:38 | #36
  37. 2020 年 8 月 10 日 21:58 | #37
  38. 2020 年 8 月 11 日 01:52 | #38
  39. 2020 年 8 月 11 日 02:56 | #39
  40. 2020 年 8 月 11 日 04:06 | #40
  41. 2020 年 8 月 11 日 06:30 | #41
  42. 2020 年 8 月 11 日 07:58 | #42
  43. 2020 年 8 月 11 日 08:39 | #43
  44. 2020 年 8 月 11 日 10:45 | #44
  45. 2020 年 8 月 11 日 12:32 | #45
  46. 2020 年 8 月 11 日 16:00 | #46
  47. 2020 年 8 月 11 日 16:08 | #47
  48. 2020 年 8 月 11 日 17:49 | #48
  49. 2020 年 8 月 11 日 19:07 | #49
  50. 2020 年 8 月 11 日 20:38 | #50
  51. 2020 年 8 月 11 日 21:47 | #51
  52. 2020 年 8 月 11 日 23:00 | #52
  53. 2020 年 8 月 12 日 00:35 | #53
  54. 2020 年 8 月 12 日 04:22 | #54
  55. 2020 年 8 月 12 日 05:47 | #55
  56. 2020 年 8 月 12 日 07:27 | #56
  57. 2020 年 8 月 12 日 09:21 | #57
  58. 2020 年 8 月 12 日 11:38 | #58
  59. 2020 年 8 月 12 日 12:38 | #59
  60. 2020 年 8 月 12 日 17:43 | #60
  61. 2020 年 8 月 12 日 18:31 | #61
  62. 2020 年 8 月 12 日 19:15 | #62
  63. 2020 年 8 月 12 日 21:59 | #63
  64. 2020 年 8 月 12 日 23:26 | #64
  65. 2020 年 8 月 12 日 23:57 | #65
  66. 2020 年 8 月 13 日 01:55 | #66
  67. 2020 年 8 月 13 日 02:34 | #67
  68. 2020 年 8 月 13 日 04:35 | #68
  69. 2020 年 8 月 13 日 07:31 | #69
  70. 2020 年 8 月 13 日 09:19 | #70
  71. 2020 年 8 月 13 日 10:54 | #71
  72. 2020 年 8 月 13 日 14:16 | #72
  73. 2020 年 8 月 13 日 15:03 | #73
  74. 2020 年 8 月 13 日 16:43 | #74
  75. 2020 年 8 月 13 日 17:00 | #75
  76. 2020 年 8 月 13 日 19:12 | #76
  77. 2020 年 8 月 13 日 20:30 | #77
  78. 2020 年 8 月 14 日 01:49 | #78
  79. 2020 年 8 月 14 日 04:08 | #79
  80. 2020 年 8 月 14 日 07:18 | #80
  81. 2020 年 8 月 14 日 08:03 | #81
  82. 2020 年 8 月 14 日 09:28 | #82
  83. 2020 年 8 月 14 日 10:01 | #83
  84. 2020 年 8 月 14 日 13:19 | #84
  85. 2020 年 8 月 14 日 17:46 | #85
  86. 2020 年 8 月 14 日 19:50 | #86
  87. 2020 年 8 月 14 日 21:15 | #87
  88. 2020 年 8 月 15 日 00:16 | #88