Sha256: f5a1f958b01d185ad45cef71f4505de85cf6e8e91900021382468b50b464f2cc

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 Bytes

Contents

require 'spec_helper'

describe 'Stand Alone' do
  let(:instance) { clazz.new }
  let(:clazz) { Class.new }
  let(:builder) { Sinclair.new(clazz) }

  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

2 entries across 2 versions & 1 rubygems

Version Path
sinclair-1.1.0 spec/integration/readme_spec.rb
sinclair-1.0.0 spec/integration/readme_spec.rb