Sha256: 0ac8c5f2cce0d5283203a4d5ef89b2b3b8298c357856bd8e6eb8f78686e02610

Contents?: true

Size: 481 Bytes

Versions: 7

Compression:

Stored size: 481 Bytes

Contents

require 'spec_helper'
require 'support/dummy_presenter'


describe ActionPresenter::Utilities::Let do
  let(:presenter) { DummyPresenter }

  it 'should create new method' do
    presenter.should_receive :define_method do |name, block|
      name.should == :created_with_let

      block.should be_instance_of Proc
      block.call.should == 'I can create methods!!!'
    end

    presenter.class_eval do
      let(:created_with_let) { 'I can create methods!!!' }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
action_presenter-1.1.6 spec/action_presenter/utilities/let_spec.rb
action_presenter-1.1.5 spec/action_presenter/utilities/let_spec.rb
action_presenter-1.1.4 spec/action_presenter/utilities/let_spec.rb
action_presenter-1.1.3 spec/action_presenter/utilities/let_spec.rb
action_presenter-1.1.2 spec/action_presenter/utilities/let_spec.rb
action_presenter-1.1.1 spec/action_presenter/utilities/let_spec.rb
action_presenter-1.1 spec/action_presenter/utilities/let_spec.rb