Sha256: fa1664c8a02ae2bcb9c111fdfcbfd25e3309b552be269aa9898663baba49f1b9
Contents?: true
Size: 522 Bytes
Versions: 1
Compression:
Stored size: 522 Bytes
Contents
require 'spec_helper' describe 'Stand Alone' do let(:instance) { klass.new } let(:klass) { Class.new } let(:builder) { Sinclair.new(klass) } before do builder.add_method(:twenty, '10 + 10') builder.add_method(:eighty) { 4 * twenty } builder.build end it 'knows how to add string defined methods' do expect("Twenty => #{instance.twenty}").to eq('Twenty => 20') end it 'knows how to add block defined methods' do expect("Eighty => #{instance.eighty}").to eq('Eighty => 80') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sinclair-1.1.1 | spec/integration/readme_spec.rb |