Skip to content

Instantly share code, notes, and snippets.

View rojotek's full-sized avatar

Rob Dawson rojotek

  • ConsenSys
  • Australia
View GitHub Profile
describe 10 do
it {should be_less_than 11}
it {should_not be_less_than 5}
end
RSpec::Matchers.define :be_less_than do |expected|
match do |actual|
result = actual<expected
result &&=actual>@low_value unless @low_value.nil?
result
end
chain :and_greater_than do |low_value|
@low_value=low_value
end
end
describe 10 do
it {should be_less_than(11).and_greater_than(5)}
end
RSpec::Matchers.define :be_less_than do |expected|
match do |actual|
result = actual<expected
result &&=actual>@low_value unless @low_value.nil?
result
end
chain :and_greater_than do |low_value|
@low_value=low_value
end
description do
RSpec::Matchers.define :be_less_than do |expected|
match do |actual|
result = actual<expected
result &&=actual>@low_value unless @low_value.nil?
result
end
chain :and_greater_than do |low_value|
@low_value=low_value
end
description do
ruby --1.9
export RUBYOPT="--1.9"
export JRUBY_OPTS=--1.9
compat.version=RUBY1_9
@rojotek
rojotek / ruby.2.1.0-setup.sh
Last active August 29, 2015 13:56 — forked from mustafaturan/ruby.2.0.0-setup.sh
fork of ruby 2.0.0 setup to make it work with with ruby 2.1 ruby-gems 2.2.2 on centos 6.4
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick