Sha256: 41c8d39107b44a9a7248013d66a515c8385bf0ee396a57228c81073d2855c9a7

Contents?: true

Size: 615 Bytes

Versions: 6

Compression:

Stored size: 615 Bytes

Contents

#------------------------------------------------------------------------------
def it_behaves_like(name, method = nil)
  @method = method
  behaves_like(name)
end

class Should

  # usage: .should.be_true and .should.be_false
  #------------------------------------------------------------------------------
  def be_true
    self == true
  end
  
  def be_false
    self == false
  end
end

# usage:  .should.be truthy and .should.be falsey
#------------------------------------------------------------------------------
def truthy
  lambda { |obj| obj == true }
end
def falsey
  lambda { |obj| obj == false }
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
motion-kramdown-1.16.2 spec/motion-kramdown/_helpers/it_behaves_like.rb
motion-kramdown-0.6.0 spec/helpers/it_behaves_like.rb
motion-kramdown-0.5.1 spec/helpers/it_behaves_like.rb
motion-strscan-0.5.1 spec/helpers/it_behaves_like.rb
motion-kramdown-0.5.0 spec/helpers/it_behaves_like.rb
motion-strscan-0.5.0 spec/helpers/it_behaves_like.rb