Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More tryouts converstion; renamed tryouts dir to try

  • Loading branch information...
commit f5c2bc0225294568bb85f3dacb60bc3947496e11 1 parent 5633c11
@delano authored
Showing with 321 additions and 359 deletions.
  1. 0  tryouts/01_mixins_tryouts.rb → try/01_mixins_try.rb
  2. 0  tryouts/02_compat_tryouts.rb → try/02_compat_try.rb
  3. +41 −0 try/05_gibbler_digest_try.rb
  4. +135 −0 try/10_basic_try.rb
  5. +29 −0 try/11_basic_sha256_try.rb
  6. +80 −0 try/14_extended_try.rb
  7. 0  tryouts/15_file_tryouts.rb → try/15_file_try.rb
  8. 0  tryouts/16_uri_tryouts.rb → try/16_uri_try.rb
  9. 0  tryouts/17_complex_object_tryouts.rb → try/17_complex_object_try.rb
  10. +36 −0 try/18_proc_try.rb
  11. 0  tryouts/20_time_tryouts.rb → try/20_time_try.rb
  12. 0  tryouts/30_secret_tryouts.rb → try/30_secret_try.rb
  13. 0  tryouts/50_history_tryouts.rb → try/50_history_try.rb
  14. 0  tryouts/51_hash_history_tryouts.rb → try/51_hash_history_try.rb
  15. 0  tryouts/52_array_history_tryouts.rb → try/52_array_history_try.rb
  16. 0  tryouts/53_string_history_tryouts.rb → try/53_string_history_try.rb
  17. 0  tryouts/57_arbitrary_history_tryouts.rb → try/57_arbitrary_history_try.rb
  18. 0  tryouts/59_history_exceptions_tryouts.rb → try/59_history_exceptions_try.rb
  19. 0  tryouts/80_performance_tryouts.rb → try/80_performance_try.rb
  20. 0  tryouts/90_alias_tryouts.rb → try/90_alias_try.rb
  21. 0  {tryouts → try}/object_hash_demo.rb
  22. +0 −57 tryouts/05_gibbler_digest_tryouts.rb
  23. +0 −159 tryouts/10_basic_tryouts.rb
  24. +0 −40 tryouts/11_basic_sha256_tryouts.rb
  25. +0 −103 tryouts/14_extended_tryouts.rb
View
0  tryouts/01_mixins_tryouts.rb → try/01_mixins_try.rb
File renamed without changes
View
0  tryouts/02_compat_tryouts.rb → try/02_compat_try.rb
File renamed without changes
View
41 try/05_gibbler_digest_try.rb
@@ -0,0 +1,41 @@
+require 'gibbler'
+
+## has short method
+"kimmy".gibbler.short
+#=> Gibbler::Digest.new("c8027100")
+
+# can Gibbler::Digest#short
+Gibbler::Digest.new("1234567890").short
+#=> Gibbler::Digest.new("12345678")
+
+# == is strict (only exact matches)
+Gibbler::Digest.new("1234567890") == "12345678"
+#=> false
+
+# === is relaxed (allows partial matches)
+Gibbler::Digest.new("1234567890") === "12345678"
+#=> true
+
+# supports base36 output
+Gibbler::Digest.new("1234567890").base36
+#=> 'zx2tc40'
+
+# base36 works on digests too
+"kimmy".gibbler.base36
+#=> 'nd2w8270caslmly0ix3s8ruh0y8yjdt'
+
+# base36 digests can be short too
+"kimmy".gibbler.base36.short
+#=> 'nd2w8270'
+
+# to_s returns a string and can accept a base
+"kimmy".gibbler.to_s(16)
+#=> "kimmy".gibbler.base(16).to_s
+
+# base takes a base
+"kimmy".gibbler.base(17)
+#=> '12gaabd69eg5b32gf69a7a021c22g977d4gf46d6'
+
+# to_s can take a base
+"kimmy".gibbler.to_s(36)
+#=> "kimmy".gibbler.base36
View
135 try/10_basic_try.rb
@@ -0,0 +1,135 @@
+require 'gibbler'
+
+#Gibbler.enable_debug
+
+# include Gibbler raises exception
+begin
+ a = Class.new
+ a.send :include, Gibbler
+rescue RuntimeError
+ :success
+end
+#=> :success
+
+# Symbol digests are consistent
+:kimmy.gibbler
+#=> '52be7494a602d85ff5d8a8ab4ffe7f1b171587df'
+
+# String digests are consistent
+'kimmy'.gibbler
+#=> 'c8027100ecc54945ab15ddac529230e38b1ba6a1'
+
+# String and Symbol return different digests
+:kimmy.gibbler != "kimmy".gibbler
+#=> true
+
+# Class digests are consistent
+Class.gibbler
+#=> '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
+
+# Fixnum instance digests are consistent
+1.gibbler
+#=> 'a9cad665549bd22a4346fcf602d9d3c3b0482bbe'
+
+# Bignum instance
+100000000000.gibbler
+#=> '608256db120251843843bba57e9b2c7adb7342aa'
+
+# Empty Hash instance digests are consistent
+Hash.new.gibbler
+#=> '4fdcadc66a38feb9c57faf3c5a18d5e76a6d29bf'
+
+# Populated Hash instance
+{ :a => [1,2,3, [4,5,6]], :b => { :c => Class } }.gibbler
+#=> "1d4b62e1e9f2c097b0cefb6877bf47c2015cdd21"
+
+# Empty Array instance
+Array.new.gibbler
+#=> '48fda57c05684c9e5c3259557851943572183a21'
+
+# Populated Array instance
+[1, 2, :runtime, [3, "four", [Object, true]]].gibbler
+#=> "3e1d79d113a409a96a13ca3879fc4c42027aa74b"
+
+# Knows when a Hash has not changed
+a = { :magic => true }
+a.gibbler
+a[:magic] = true
+a.gibbled?
+# => false
+
+# Knows when a Hash has changed
+a = { :magic => true }
+a.gibbler
+a[:magic] = false
+a.gibbled?
+#=> true
+
+# Two Symbol digests don't cross streams
+a, b = :something, :anything
+a.gibbler
+b.gibbler
+[a.gibbler_cache.short, b.gibbler_cache.short]
+#=> ["667ce086", "92d5f7cd"]
+
+# Two String digests don't cross streams" do
+a, b = 'something', 'anything'
+a.gibbler
+b.gibbler
+[a.gibbler_cache.short, b.gibbler_cache.short]
+#=> ["ce0c7694", "c13b2f02"]
+
+## DISABLED: If gibbler/history is required, there will be an
+## additional attic_var (:gibbler_history), but only if the
+## gibbler_history method has been called already (the history
+## remains nil by default). The fix is not straightfroward and
+## tests are not important anyway so disabling them is fine.
+## Symbol has list of attic vars", [:gibbler_cache] do
+# Symbol.attic_vars
+#end
+#
+## String has list of attic vars", [:gibbler_cache] do
+# String.attic_vars
+#end
+#
+## Hash has list of attic vars", [:gibbler_cache] do
+# Hash.attic_vars
+#end
+
+# Freezing an object will update the digest
+ a = { :a => 1 }
+ pre = a.gibbler;
+ a[:a] = 2
+ post = a.freeze.gibbler
+ pre != post && post == a.gibbler_cache
+#=> true
+
+# works on arbitrary objects" do
+class ::FullHouse
+ include Gibbler::Complex
+ attr_accessor :roles
+end
+a = FullHouse.new
+a.roles = [:jesse, :joey, :danny, :kimmy, :michelle, :dj, :stephanie]
+a.gibbler
+#=> "fa5f741275b6b27932537e1946042b0286286e1d"
+
+# TODO: Update for Attic 0.4
+# doesn't reveal @__gibbler_digest__ instance variable", false do
+ a = {}
+ a.gibbler # We need to gibbler first so it sets a value to the instance var
+ val = RUBY_VERSION >= '1.9' ? :'@__gibbler_digest__' : '@__gibbler_digest__'
+ a.instance_variables.member? val
+#=> false
+
+# previous digest"
+ a = "kimmy"
+ a.gibbler
+ a.gibbler_cache
+#=> 'c8027100ecc54945ab15ddac529230e38b1ba6a1'
+
+
+
+
+
+
View
29 try/11_basic_sha256_try.rb
@@ -0,0 +1,29 @@
+require 'gibbler'
+
+# NOTE: JRuby requires that we use OpenSSL::Digest::SHA256
+if Tryouts.sysinfo.vm == :java
+ require 'openssl'
+ Gibbler.digest_type = OpenSSL::Digest::SHA256
+else
+ Gibbler.digest_type = Digest::SHA256
+end
+
+
+## A Symbol can gibbler
+:anything.gibbler
+#=> '754f87ca720ec256633a286d9270d68478850b2abd7b0ae65021cb769ae70c08'
+
+## Class can gibbler
+Class.gibbler
+#=> 'd345c0afb4e8da0133a3946d3bd9b2622b0acdd8d6cc1237470cc637a9e4777f'
+
+## TrueClass can gibbler
+TrueClass.gibbler
+#=> 'b7b874a9bff7825caa57750a900652354ac601b77497b694d313f658c69d25b4'
+
+# Empty Hash instance
+{}.gibbler
+#=> '88d2bcbd68ce593fd2e0e06f276f7301357516291b95c0c53038e61a9bf091e5'
+
+Gibbler.digest_type = Digest::SHA1
+
View
80 try/14_extended_try.rb
@@ -0,0 +1,80 @@
+require 'gibbler'
+
+Gibbler.digest_type = Digest::SHA1
+
+## true can gibbler
+true.gibbler
+#=> 'f2b0150c84c5c834406ec9cdec989a0fa938b4ad'
+
+# false can gibbler
+false.gibbler
+#=> 'abee839edf5f9c101c505c28987ca35c31c7fc8d'
+
+# TrueClass can gibbler
+TrueClass.gibbler
+#=> '583fb214ec50d2c4a123cc52de0c65e801d13516'
+
+# FalseClass can gibbler
+FalseClass.gibbler
+#=> '11f262be475ddf38a25888e9f6ec82f384a7c58b'
+
+# Class can gibbler
+Class.gibbler
+#=> '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
+
+# Object can gibbler
+Object.gibbler
+#=> '5620e4a8b10ec6830fece61d33f5d3e9a349b4c2'
+
+# Class instance can gibbler
+Class.new.gibbler
+#=> '083feec632e6cd5347e3fb3c7048365c3a0d710e'
+
+# Module can gibbler
+Module.gibbler
+#=> '7295241e929ffd7cc974cf8d4481291e070937fc'
+
+# Module instance can gibbler
+Module.new.gibbler
+#=> '6b5a192fd377dfc5c2828a3ad6105b68b6db33d5'
+
+# Proc can gibbler"
+Proc.gibbler
+#=> '8640f7abcbcb80e3825ed827bf36819e26119e16'
+
+# Range instance (..) can gibbler
+(1..100).gibbler
+#=> '5450635218fd16e594976e87abd0955529e28248'
+
+# Range ... is different than ..
+(1...100).gibbler != (1..100).gibbler
+#=> true
+
+# Range instance with Floats can gibbler
+(0.1...1.5).gibbler
+#=> '9d3cd5a21c17cfa0b4bb685730bd07994c486ba2'
+
+# Range instance with one Float can gibbler
+(0.1..1).gibbler
+#=> 'c725659ca0f3fa3c9ab807bb2db4b718e2dca042'
+
+# Range (..) doesn't equal range (...)"
+('a'..'e').gibbler != ('a'...'e').gibbler
+#=> true
+
+# nil has a gibbler
+nil.gibbler
+#=> '06fdf26b2a64e90cd35ea9162d9cc48c9f6bb13c'
+
+# Module can gibbler
+Module.gibbler
+#=> '7295241e929ffd7cc974cf8d4481291e070937fc'
+
+# Module instance can gibbler
+Module.new.gibbler
+#=> '6b5a192fd377dfc5c2828a3ad6105b68b6db33d5'
+
+# Class can gibbler
+Class.gibbler
+#=> '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
+
View
0  tryouts/15_file_tryouts.rb → try/15_file_try.rb
File renamed without changes
View
0  tryouts/16_uri_tryouts.rb → try/16_uri_try.rb
File renamed without changes
View
0  tryouts/17_complex_object_tryouts.rb → try/17_complex_object_try.rb
File renamed without changes
View
36 try/18_proc_try.rb
@@ -0,0 +1,36 @@
+require 'gibbler'
+
+class ::MyProc < Proc; end
+
+
+## Proc.new can gibbler
+Proc.new() { }.gibbler
+#=> '12075835e94be34438376cd7a54c8db7e746f15d'
+
+# Proc can gibbler
+Proc.gibbler
+#=> '8640f7abcbcb80e3825ed827bf36819e26119e16'
+
+## proc can gibbler
+proc {}.gibbler
+#=> '12075835e94be34438376cd7a54c8db7e746f15d'
+
+# lambda can gibbler
+lambda {}.gibbler
+#=> '12075835e94be34438376cd7a54c8db7e746f15d'
+
+# lambda gibbler is not aware of arity
+lambda { |v| }.gibbler
+#=> '12075835e94be34438376cd7a54c8db7e746f15d'
+
+# proc gibbler is not aware of arity
+proc { |v| }.gibbler
+#=> '12075835e94be34438376cd7a54c8db7e746f15d'
+
+# Proc gibbler is not aware of proc payload"
+proc { |v| 1; }.gibbler
+#=> '12075835e94be34438376cd7a54c8db7e746f15d'
+
+# MyProc has a different digest
+MyProc.new() { }.gibbler
+#=> "c979a45653acaddcb9c1581a7de49c94ac96e128"
View
0  tryouts/20_time_tryouts.rb → try/20_time_try.rb
File renamed without changes
View
0  tryouts/30_secret_tryouts.rb → try/30_secret_try.rb
File renamed without changes
View
0  tryouts/50_history_tryouts.rb → try/50_history_try.rb
File renamed without changes
View
0  tryouts/51_hash_history_tryouts.rb → try/51_hash_history_try.rb
File renamed without changes
View
0  tryouts/52_array_history_tryouts.rb → try/52_array_history_try.rb
File renamed without changes
View
0  tryouts/53_string_history_tryouts.rb → try/53_string_history_try.rb
File renamed without changes
View
0  tryouts/57_arbitrary_history_tryouts.rb → try/57_arbitrary_history_try.rb
File renamed without changes
View
0  tryouts/59_history_exceptions_tryouts.rb → try/59_history_exceptions_try.rb
File renamed without changes
View
0  tryouts/80_performance_tryouts.rb → try/80_performance_try.rb
File renamed without changes
View
0  tryouts/90_alias_tryouts.rb → try/90_alias_try.rb
File renamed without changes
View
0  tryouts/object_hash_demo.rb → try/object_hash_demo.rb
File renamed without changes
View
57 tryouts/05_gibbler_digest_tryouts.rb
@@ -1,57 +0,0 @@
-require 'gibbler'
-
-## has short method
-POOP.gibbler.short
-#=> Gibbler::Digest.new("c8027100")
-
-# can Gibbler::Digest#short
-Gibbler::Digest.new("1234567890").short
-#=> Gibbler::Digest.new("12345678")
-
-
-
-
-
-# == is strict (only exact matches)
-Gibbler::Digest.new("1234567890") == "12345678"
-#=> true
-
-# === is relaxed (allows partial matches)
-Gibbler::Digest.new("1234567890") === "12345678"
-#=> false
-
-__END__
-
- drill "", true do
-
- end
-
- dream 'zx2tc40'
- drill "supports base36 output" do
- Gibbler::Digest.new("1234567890").base36
- end
-
- dream 'nd2w8270caslmly0ix3s8ruh0y8yjdt'
- drill "base36 works on digests too" do
- "kimmy".gibbler.base36
- end
-
- dream 'nd2w8270'
- drill "base36 digests can be short too" do
- "kimmy".gibbler.base36.short
- end
-
- drill "to_s returns a string and can accept a base" do
- "kimmy".gibbler.to_s(16) == "kimmy".gibbler.base(16).to_s
- end
-
- dream '12gaabd69eg5b32gf69a7a021c22g977d4gf46d6'
- drill "base takes a base" do
- "kimmy".gibbler.base(17)
- end
-
- drill "to_s can take a base" do
- "kimmy".gibbler.to_s(36) == "kimmy".gibbler.base36
- end
-end
-
View
159 tryouts/10_basic_tryouts.rb
@@ -1,159 +0,0 @@
-
-library :gibbler, 'lib'
-library 'gibbler/history', File.dirname(__FILE__), '..', 'lib'
-group "Gibbler Gazette"
-
-Gibbler.enable_debug if Tryouts.verbose > 3
-
-tryouts "Basic syntax with SHA1" do
-
- dream :exception, RuntimeError
- drill "include Gibbler raises exception" do
- a = Class.new
- a.send :include, Gibbler
- end
-
- dream :respond_to?, :gibbler
- dream :gibbler, '52be7494a602d85ff5d8a8ab4ffe7f1b171587df'
- drill "Symbol can gibbler", :kimmy
-
- dream :respond_to?, :gibbler
- dream :gibbler, 'c8027100ecc54945ab15ddac529230e38b1ba6a1'
- drill "String can gibbler" do
- "kimmy"
- end
-
- drill "String and Symbol return different digests", true do
- :kimmy.gibbler != "kimmy"
- end
-
- dream :respond_to?, :gibbler
- dream :gibbler, '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
- drill "Class can gibbler", Class
-
- dream :respond_to?, :gibbler
- dream :gibbler, '4fdcadc66a38feb9c57faf3c5a18d5e76a6d29bf'
- drill "Empty Hash instance", Hash.new
-
- dream :gibbler, 'a9cad665549bd22a4346fcf602d9d3c3b0482bbe'
- drill "Fixnum instance" do
- 1
- end
-
- dream :gibbler, '608256db120251843843bba57e9b2c7adb7342aa'
- drill "Bignum instance" do
- 100000000000
- end
-
- dream :gibbler, "1d4b62e1e9f2c097b0cefb6877bf47c2015cdd21"
- drill "Populated Hash instance" do
- {
- :a => [1,2,3, [4,5,6]],
- :b => { :c => Class }
- }
- end
-
- dream :respond_to?, :gibbler
- dream :gibbler, '48fda57c05684c9e5c3259557851943572183a21'
- drill "Empty Array instance", Array.new
-
- dream :gibbler, "3e1d79d113a409a96a13ca3879fc4c42027aa74b"
- drill "Populated Array instance" do
- [1, 2, :runtime, [3, "four", [Object, true]]]
- end
-
- drill "Knows when a Hash has not changed", false do
- a = { :magic => true }
- a.gibbler
- a[:magic] = true
- a.gibbled?
- end
-
- drill "Knows when a Hash has changed", true do
- a = { :magic => true }
- a.gibbler
- a[:magic] = false
- a.gibbled?
- end
-
- dream ["667ce086", "92d5f7cd"]
- drill "Symbols digests don't cross streams" do
- a, b = :something, :anything
- a.gibbler
- b.gibbler
- [a.gibbler_cache.short, b.gibbler_cache.short]
- end
-
- dream ["ce0c7694", "c13b2f02"]
- drill "String digests don't cross streams" do
- a, b = 'something', 'anything'
- a.gibbler
- b.gibbler
- [a.gibbler_cache.short, b.gibbler_cache.short]
- end
-
- ## DISABLED: If gibbler/history is required, there will be an
- ## additional attic_var (:gibbler_history), but only if the
- ## gibbler_history method has been called already (the history
- ## remains nil by default). The fix is not straightfroward and
- ## tests are not important anyway so disabling them is fine.
- #drill "Symbol has list of attic vars", [:gibbler_cache] do
- # Symbol.attic_vars
- #end
- #
- #drill "String has list of attic vars", [:gibbler_cache] do
- # String.attic_vars
- #end
- #
- #drill "Hash has list of attic vars", [:gibbler_cache] do
- # Hash.attic_vars
- #end
-
- drill "Freezing an object will update the digest", true do
- a = { :a => 1 }
- pre = a.gibbler;
- a[:a] = 2
- post = a.freeze.gibbler
- stash :pre, pre
- stash :post, post
- pre != post && post == a.gibbler_cache
- end
-
- dream :gibbler, "fa5f741275b6b27932537e1946042b0286286e1d"
- drill "works on arbitrary objects" do
- class ::FullHouse
- include Gibbler::Complex
- attr_accessor :roles
- end
- a = FullHouse.new
- a.roles = [:jesse, :joey, :danny, :kimmy, :michelle, :dj, :stephanie]
- a
- end
-
- # TODO: Update for Attic 0.4
- drill "doesn't reveal @__gibbler_digest__ instance variable", false do
- a = {}
- a.gibbler # We need to gibbler first so it sets a value to the instance var
- val = Tryouts.sysinfo.ruby[1] == 9 ? :'@__gibbler_digest__' : '@__gibbler_digest__'
- stash :ivars, a.instance_variables
- stash :smeths, Gibbler.singleton_methods
- a.instance_variables.member? val
- end
-
- drill "previous digest", 'c8027100ecc54945ab15ddac529230e38b1ba6a1' do
- a = "kimmy"
- a.gibbler
- #stash :methods, a.methods.sort
- #
- #stash :string_methods, String.methods.sort
- #stash :gstring_methods, Gibbler::String.methods.sort
- #stash :class_methods, a.class.methods.sort
- stash :ivars, a.instance_variables
- a.gibbler_cache
- end
-
-end
-
-
-
-
View
40 tryouts/11_basic_sha256_tryouts.rb
@@ -1,40 +0,0 @@
-
-library :gibbler, File.dirname(__FILE__), '..', 'lib'
-group "Gibbler Gazette"
-
-Gibbler.enable_debug if Tryouts.verbose > 3
-
-
-tryouts "Basic syntax with SHA256" do
-
- setup do
- # NOTE: JRuby requires that we use OpenSSL::Digest::SHA256
- if Tryouts.sysinfo.vm == :java
- require 'openssl'
- Gibbler.digest_type = OpenSSL::Digest::SHA256
- else
- Gibbler.digest_type = Digest::SHA256
- end
-
- end
-
- clean do
- Gibbler.digest_type = Digest::SHA1
- end
-
- dream :gibbler, '754f87ca720ec256633a286d9270d68478850b2abd7b0ae65021cb769ae70c08'
- drill "A Symbol can gibbler", :anything
-
- dream :gibbler, 'd345c0afb4e8da0133a3946d3bd9b2622b0acdd8d6cc1237470cc637a9e4777f'
- drill "Class can gibbler", Class
-
- dream :gibbler, 'b7b874a9bff7825caa57750a900652354ac601b77497b694d313f658c69d25b4'
- drill "TrueClass can gibbler", TrueClass
-
- dream :gibbler, '88d2bcbd68ce593fd2e0e06f276f7301357516291b95c0c53038e61a9bf091e5'
- drill "Empty Hash instance", {}
-
-end
-
-
-
View
103 tryouts/14_extended_tryouts.rb
@@ -1,103 +0,0 @@
-
-library :gibbler, 'lib'
-group "Gibbler Gazette"
-
-Gibbler.enable_debug if Tryouts.verbose > 3
-Gibbler.digest_type = Digest::SHA1
-
-tryouts "Extended object tryouts" do
-
- dream :gibbler, 'f2b0150c84c5c834406ec9cdec989a0fa938b4ad'
- drill "true can gibbler", true
-
- dream :gibbler, 'abee839edf5f9c101c505c28987ca35c31c7fc8d'
- drill "false can gibbler", false
-
- dream :gibbler, '583fb214ec50d2c4a123cc52de0c65e801d13516'
- drill "TrueClass can gibbler", TrueClass
-
- dream :gibbler, '11f262be475ddf38a25888e9f6ec82f384a7c58b'
- drill "FalseClass can gibbler", FalseClass
-
- dream :gibbler, '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
- drill "Class can gibbler", Class
-
- dream :gibbler, '5620e4a8b10ec6830fece61d33f5d3e9a349b4c2'
- drill "Object can gibbler", Object
-
- dream :gibbler, '083feec632e6cd5347e3fb3c7048365c3a0d710e'
- drill "Class instance can gibbler", Class.new
-
- dream :gibbler, '7295241e929ffd7cc974cf8d4481291e070937fc'
- drill "Module can gibbler", Module
-
- dream :gibbler, '6b5a192fd377dfc5c2828a3ad6105b68b6db33d5'
- drill "Module instance can gibbler", Module.new
-
- dream :gibbler, '8640f7abcbcb80e3825ed827bf36819e26119e16'
- drill "Proc can gibbler", Proc
-
- dream :gibbler, '5450635218fd16e594976e87abd0955529e28248'
- drill "Range instance (..) can gibbler", 1..100
-
- dream :gibbler, 'f0cad8cc7582886822e1abb6525a3986d542b810'
- drill "Range instance (...) can gibbler", 1...100
-
- dream :gibbler, '9d3cd5a21c17cfa0b4bb685730bd07994c486ba2'
- drill "Range instance with Floats can gibbler", 0.1...1.5
-
- dream :gibbler, 'c725659ca0f3fa3c9ab807bb2db4b718e2dca042'
- drill "Range instance with one Float can gibbler", 0.1..1
-
- drill "Range (..) doesn't equal range (...)", true do
- ('a'..'e').gibbler != ('a'...'e').gibbler
- end
-
- dream '06fdf26b2a64e90cd35ea9162d9cc48c9f6bb13c'
- drill "nil has a gibbler", nil.gibbler
-
-
- dream :gibbler, '7295241e929ffd7cc974cf8d4481291e070937fc'
- drill "Module can gibbler", Module
-
- dream :gibbler, '6b5a192fd377dfc5c2828a3ad6105b68b6db33d5'
- drill "Module instance can gibbler", Module.new
-
- dream :gibbler, '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
- drill "Class can gibbler", Class
-
-end
-
-
-tryouts "Proc" do
-
- setup do
- class ::MyProc < Proc; end
- end
-
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
- drill "Proc.new can gibbler", Proc.new() { }
-
- dream :gibbler, '8640f7abcbcb80e3825ed827bf36819e26119e16'
- drill "Proc can gibbler", Proc
-
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
- drill "proc can gibbler", proc {}
-
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
- drill "lambda can gibbler", lambda {}
-
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
- drill "lambda gibbler is not aware of arity", lambda { |v| }
-
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
- drill "proc gibbler is not aware of arity", proc { |v| }
-
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
- drill "Proc gibbler is not aware of proc payload", proc { |v| 1; }
-
- dream :gibbler, "c979a45653acaddcb9c1581a7de49c94ac96e128"
- drill "MyProc has a different digest" do
- MyProc.new() { }
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.