Guest User

Untitled

a guest
Apr 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.14 KB | None | 0 0
  1.  
  2. MSpec.time_from
  3. - returns a Time object if the parse is successful
  4. - uses UTC for the timezone
  5. - understands and parses yyyy/mm/dd format
  6. - understands and parses yyyy/mm/dd format with [.-_] alternate separator
  7. - understands and parses mm/dd/yyyy format
  8. - understands and parses mm/dd/yyyy format with [.-_] alternate separator
  9. - understands and parses yyyy/mm/dd hh:mm[:ss] format
  10. - understands and parses yyyy/mm/dd hh:mm[:ss] format with [.-_] separators
  11. - understands and parses mm/dd/yyyy hh:mm[:ss] format
  12. - understands and parses mm/dd/yyyy hh:mm[:ss] format with [.-_] separators
  13.  
  14. MSpec.engine?
  15. - returns true if passed :ruby and RUBY_NAME == 'ruby'
  16. - returns true if passed :rbx and RUBY_NAME == 'rbx'
  17. - returns true if passed :rubinius and RUBY_NAME == 'rbx'
  18. - returns true if passed :jruby and RUBY_NAME == 'jruby'
  19. - returns false when passed an unrecognized name
  20.  
  21. MSpec.guard?
  22. - accepts multiple arguments and passes them to the block
  23. - returns true when the block evaluates to true
  24. - returns false when the block evaluates to false
  25.  
  26. MSpec.runner?
  27. - returns true when passed :mspec and ENV['MSPEC_RUNNER'] is true
  28. - returns false when passed :mspec and ENV['MSPEC_RUNNER'] is false
  29. - returns true when passed :rspec and ENV['RSPEC_RUNNER'] is false but the constant Spec exists
  30. - returns true when passed :rspec and ENV['RSPEC_RUNNER'] is true but the constant Spec does not exist
  31.  
  32. MSpec.platform?
  33. - returns false when arg does not match RUBY_PLATFORM
  34. - returns false when no arg matches RUBY_PLATFORM
  35. - returns true when arg matches RUBY_PLATFORM
  36. - returns true when any arg matches RUBY_PLATFORM
  37.  
  38. MSpec.version?
  39. - returns true if arg is numerically equivalent to version
  40. - returns false if arg is numerically smaller or larger than version
  41. - returns true if any of args is numerically equivalent to version
  42. - accepts preceding equality operator and returns version == given
  43. - accepts < preceding the version and returns version < given
  44. - accepts > preceding the version and returns version > given
  45. - accepts <= preceding the version and returns version <= given
  46. - accepts >= preceding the version and returns version >= given
  47. - accepts any combination of multiple comparisons and returns true if any is true
  48. - accepts Ranges and returns true if version numerically falls in range
  49. - returns false if version do not numerically fall in range
  50.  
  51. MSpec.patch?
  52. - returns true if string is numerically equivalent to patchlevel
  53. - returns true if integer is numerically equivalent to patchlevel
  54. - returns false if string is numerically smaller/larger than patchlevel
  55. - returns false if integer is numerically not equal to patchlevel
  56. - returns true if any string is numerically equivalent to patchlevel
  57. - returns true if any integer is numerically equivalent to patchlevel
  58. - accepts mixed string and numeric arguments
  59. - accepts equality operator preceding the string returning patchlevel == given
  60. - accepts < preceding the string and returns patchlevel < given
  61. - accepts > preceding the string and returns patchlevel > given
  62. - accepts <= preceding the string and returns patchlevel <= given
  63. - accepts >= preceding the string and returns patchlevel >= given
  64. - accepts any combination of multiple comparisons and returns true if any match
  65. - accepts string Ranges and returns true if patch falls in the range
  66. - accepts integer Ranges and returns true for patch falls in the range
  67.  
  68. MSpec.date? (converting argument with MSpec.time_from)
  69. - returns true when arg matches both dates
  70. - returns false when arg does not match dates
  71. - returns true when any arg matches dates
  72. - returns false when none of the args matches dates
  73. - accepts preceding equality operator and returns target date == date
  74. - accepts preceding < and returns target date < date
  75. - accepts preceding > and returns target date > date
  76. - accepts preceding <= and returns target date <= date
  77. - accepts preceding >= and returns target date >= date
  78. - returns true when arg is a Range and dates fall in the range
  79. - returns false when arg is a Range and dates do not fall in the range
  80. - raises an ArgumentError if given a Range with operators, not just dates
  81.  
  82. MSpec.wordsize?
  83. - returns whether determined platform wordsize is 32 if given 32
  84. - returns whether determined platform wordsize is 64 if given 64
  85.  
  86. MSpec.os?
  87. - returns true if host OS can be matched to given
  88. - returns false if host OS cannot be matched to given
  89.  
  90. Object#quarantine!
  91. - never yields
  92. - may be used to nest other guards but they will never execute
  93.  
  94. Object#ruby_bug
  95. - raises an exception if not given a report ID string
  96. - does not yield if host's RUBY_NAME == STANDARD
  97. - yields if host's RUBY_NAME != STANDARD
  98. - runs nested guards normally when it yields
  99.  
  100. Object#fails_on
  101. - does not yield when RUBY_NAME matched
  102. - yields when RUBY_NAME not matched
  103. - runs nested guards normally when it yields
  104.  
  105. Object#extended_on
  106. - does not yield when RUBY_NAME matched
  107. - yields when does RUBY_NAME not matched
  108. - runs nested guards normally when it yields
  109.  
  110. Object#compliant_on
  111. - does not yield when RUBY_NAME not matched
  112. - yields when RUBY_NAME matched
  113. - implicitly includes STANDARD as an implementation
  114. - runs nested guards normally when it yields
  115.  
  116. Object#not_compliant_on
  117. - does not yield when RUBY_NAME matched
  118. - yields when RUBY_NAME not matched
  119. - runs nested guards normally when it yields
  120.  
  121. Object#deviates_on
  122. - does not yield when RUBY_NAME not matched
  123. - yields when RUBY_NAME matched
  124. - runs nested guards normally when it yields
  125.  
  126. Object#platform_is
  127. - does not yield if RUBY_PLATFORM does not contain given
  128. - yields when RUBY_PLATFORM contains given
  129. - runs nested guards normally when it yields
  130.  
  131. Object#platform_is_not
  132. - does not yield when matches RUBY_PLATFORM
  133. - yields when platform does not match RUBY_PLATFORM
  134. - runs nested guards normally when it yields
  135.  
  136. Object#platform_is :version => VERSION_SPEC
  137. - yields when matches RUBY_VERSION
  138. - does not yield when does not match RUBY_VERSION
  139. - runs nested guards normally when it yields
  140.  
  141. Object#platform_is_not :version => VERSION_SPEC
  142. - does not yield when matches RUBY_VERSION
  143. - yields when does not match RUBY_VERSION
  144. - runs nested guards normally when it yields
  145.  
  146. Object#platform_is :patch => PATCHLEVEL_SPEC
  147. - does not yield when does not match RUBY_PATCHLEVEL
  148. - yields when matches RUBY_PATCHLEVEL
  149. - runs nested guards normally when it yields
  150.  
  151. Object#platform_is_not :patch => PATCHLEVEL_SPEC
  152. - does not yield when matches RUBY_PATCHLEVEL
  153. - yields when does not match RUBY_PATCHLEVEL
  154. - runs nested guards normally when it yields
  155.  
  156. Object#platform_is :date => DATE_SPEC
  157. - does not yield when does not match RUBY_RELEASE_DATE
  158. - yields when matches RUBY_RELEASE_DATE
  159. - runs nested guards normally when it yields
  160.  
  161. Object#platform_is_not :date => DATE_SPEC
  162. - does not yield when matches RUBY_RELEASE_DATE
  163. - yields when matches RUBY_RELEASE_DATE
  164. - runs nested guards normally when it yields
  165.  
  166. Object#platform_is :os => OS_SPEC
  167. - yields when host OS matches
  168. - does not yield when host OS does not match
  169. - runs nested guards normally when it yields
  170.  
  171. Object#platform_is_not :os => OS_SPEC
  172. - does not yield when the host OS matches
  173. - yields when the host OS does not match
  174. - runs nested guards normally when it yields
  175.  
  176. Object#platform_is :wordsize => SIZE_SPEC
  177. - yields when matches the platform's wordsize (32 or 64)
  178. - does not yield when the platform wordsize (32 or 64) is not matched
  179. - runs nested guards normally when it yields
  180.  
  181. Object#platform_is_not :wordsize => SIZE_SPEC
  182. - yields when the platform wordsize (32 or 64) is not matched
  183. - does not yield when matches the platform's wordsize (32 or 64)
  184. - runs nested guards normally when it yields
  185.  
  186. Object#runner_is
  187. - yields when passed :mspec and ENV['MSPEC_RUNNER'] is true
  188. - does not yield when passed :mspec and ENV['MSPEC_RUNNER'] is false
  189. - yields when passed :rspec and ENV['RSPEC_RUNNER'] is true
  190. - yields when passed :rspec and the constant Spec exists
  191. - does not yield when passed :rspec and ENV['RSPEC_RUNNER'] is false and the constant Spec does not exist
  192. - runs nested guards normally when it yields
  193.  
  194. Object#runner_is_not
  195. - does not yield when passed :mspec and ENV['MSPEC_RUNNER'] is true
  196. - yields when passed :mspec and ENV['MSPEC_RUNNER'] is false
  197. - does not yield when passed :rspec and ENV['RSPEC_RUNNER'] is false but the constant Spec exists
  198. - does not yield when passed :rspec and ENV['RSPEC_RUNNER'] is true but the constant Spec does not exist
  199. - runs nested guards normally when it yields
  200.  
  201. Finished in 0.132513 seconds
  202.  
  203. 137 examples, 0 failures
  204.  
  205. MSpec.version? with guard failure reporting
  206. - returns :match if engine version matches and engine version == STANDARD_VERSION
  207. - returns :mismatch if both match but engine version != STANDARD_VERSION
  208. - returns :standard_only if STANDARD_VERSION matches but engine version does not
  209. - returns :engine_only if engine version matches but STANDARD_VERSION does not
  210. - returns :neither if neither engine version nor STANDARD_VERSION match
  211.  
  212. MSpec.patch? with guard failure reporting
  213. - returns :match if engine patchlevel matches and == STANDARD_PATCHLEVEL
  214. - returns :mismatch if both match but engine patchlevel != STANDARD_PATCHLEVEL
  215. - returns :standard_only if STANDARD_PATCHLEVEL matches but engine patchlevel does not
  216. - returns :engine_only if engine patchlevel matches but STANDARD_PATCHLEVEL not
  217. - returns :neither if neither engine patchlevel nor STANDARD_PATCHLEVEL match
  218.  
  219. MSpec.date? with guard failure reporting
  220. - returns :match if engine date matches and == STANDARD_RELEASE_DATE
  221. - returns :mismatch if both match but engine date != STANDARD_RELEASE_DATE
  222. - returns :standard_only if STANDARD_RELEASE_DATE matches but engine date does not
  223. - returns :engine_only if engine date matches but STANDARD_RELEASE_DATE not
  224. - returns :neither if neither engine date nor STANDARD_RELEASE_DATE match
  225.  
  226. #compliant_on with guard failures
  227. - if engine does not match, specs converted to ComplianceFailures
  228. - if engine matches, runs normally
  229. - always implicitly includes standard
  230. - runs nested guards normally if it yields
  231.  
  232. #not_compliant_on with guard failures
  233. - if target is matched, specs converted to SpecTargetFailures
  234. - if engine engine matches but target does not, specs converted to ComplianceFailures
  235. - if neither engine nor target match, runs normally
  236. - runs nested guards normally if it yields
  237.  
  238. #quarantine! with guard failures
  239. - always converts specs to GuardFailureErrors
  240. - never runs nested guards
  241.  
  242. #ruby_bug with guard failures
  243. - raises an exception if not given a report ID string
  244. - if engine's RUBY_NAME == STANDARD, raises a GuardFailureError
  245. - if engine's RUBY_NAME != STANDARD, runs normally
  246. - runs nested guards normally when it yields
  247.  
  248. #fails_on with guard failures
  249. - if target matches, converts specs to SpecTargetFailures
  250. - if engine engine matches but target does not, converts specs to ComplianceFailures
  251. - if neither engine nor target match, runs normally
  252. - runs nested guards normally when it yields
  253.  
  254. #deviates_on with guard failures
  255. - if target matches, converts specs to SpecTargetFailures
  256. - if engine engine matches but target does not, converts specs to ComplianceFailures
  257. - if neither engine engine nor target matches, skips this block
  258. - never runs nested guards
  259.  
  260. #extended_on with guard failures
  261. - if engine matches, runs normally
  262. - if engine not matched, skips this block
  263. - runs nested guards normally when it yields
  264.  
  265. #platform_is with guard failures
  266. - if platform matches, runs normally
  267. - if platform not matched, skips this block
  268. - runs nested guards normally when it yields
  269.  
  270. #platform_is :os with guard failures
  271. - if engine OS matches, runs normally
  272. - if engine OS not matched, skips this block
  273. - runs nested guards normally when it yields
  274.  
  275. #platform_is :wordsize (32/64 bit) with guard failures
  276. - if engine wordsize matches, runs normally
  277. - if engine wordsize not matched, skips this block
  278. - runs nested guards normally when it yields
  279.  
  280. #platform_is :version with guard failures
  281. - if neither target nor engine matches, converts specs to ComplianceFailures
  282. - if engine matches but target does not, converts specs to ComplianceFailures
  283. - if target matches but engine does not, converts specs to ComplianceFailures
  284. - if both match but engine != target, converts specs to PlatformMismatchFailures
  285. - if both match and engine == target, runs normally
  286. - runs nested guards normally when it yields
  287.  
  288. #platform_is :patch with guard failures
  289. - if neither target nor engine matches, converts specs to ComplianceFailures
  290. - if engine matches but target does not, converts specs to ComplianceFailures
  291. - if target matches but engine does not, converts specs to ComplianceFailures
  292. - if both match but engine != target, converts specs to PlatformMismatchFailures
  293. - if both match and engine == target, runs normally
  294. - runs nested guards normally when it yields
  295.  
  296. #platform_is :date with guard failures
  297. - if neither engine nor target matches, converts specs to ComplianceFailures
  298. - if engine matches and target does not, converts specs to ComplianceFailures
  299. - if target matches and engine does not, converts specs to ComplianceFailures
  300. - if both match but engine != target, converts specs to PlatformMismatchFailures
  301. - if both match and engine == target, runs normally
  302. - runs nested guards normally when it yields
  303.  
  304. #platform_is_not with guard failures
  305. - if platform not matched, runs normally
  306. - if platform does match, skips this block
  307. - runs nested guards normally when it yields
  308.  
  309. #platform_is_not :os with guard failures
  310. - if engine OS does not match, runs normally
  311. - if engine OS matched, skips this block
  312. - runs nested guards normally when it yields
  313.  
  314. #platform_is_not :wordsize (32/64 bit) with guard failures
  315. - if engine wordsize does not match, runs normally
  316. - if engine wordsize matched, skips this block
  317. - runs nested guards normally when it yields
  318.  
  319. #platform_is_not :version with guard failures
  320. - if engine matches and target does not, converts specs to ComplianceFailures
  321. - if target matches and engine does not, converts specs to ComplianceFailures
  322. - if both match but engine != target, converts specs to PlatformMismatchFailures
  323. - if both match and engine == target, converts specs to ComplianceFailures
  324. - if neither engine nor target matches, runs normally
  325. - runs nested guards normally when it yields
  326.  
  327. #platform_is_not :patch with guard failures
  328. - if engine matches and target does not, converts specs to ComplianceFailures
  329. - if target matches and engine does not, converts specs to ComplianceFailures
  330. - if both match but engine != target, converts specs to PlatformMismatchFailures
  331. - if both match and engine == target, converts specs to ComplianceFailures
  332. - if neither engine nor target matches, runs normally
  333. - runs nested guards normally when it yields
  334.  
  335. #platform_is_not :date with guard failures
  336. - if engine matches and target does not, converts specs to ComplianceFailures
  337. - if target matches and engine does not, converts specs to ComplianceFailures
  338. - if both match but engine != target, converts specs to PlatformMismatchFailures
  339. - if both match and engine == target, converts specs to ComplianceFailures
  340. - if neither engine nor target match, runs normally
  341. - runs nested guards normally when it yields
  342.  
  343. Finished in 0.084309 seconds
  344.  
  345. 94 examples, 0 failures
Add Comment
Please, Sign In to add comment