Skip to content

Instantly share code, notes, and snippets.


Clay Shentrup ClayShentrup

View GitHub Profile
ClayShentrup /
Created Dec 12, 2017 — forked from JunichiIto/
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
ClayShentrup / wrap.rb
Created Jun 26, 2012 — forked from garybernhardt/wrap.rb
Probably a really bad implementation of word wrapping
View wrap.rb
class Wrap <, :max_length)
def self.wrap(s, max_length)
raise"Maximum wrap length can't be 0") if max_length == 0
new(s, max_length).wrap
def wrap
return [""] if blank?