Sha256: 9a91d2ce367d7cda71779f954b3b29237da136757fbac9f6611f824cbaa87dbf

Contents?: true

Size: 684 Bytes

Versions: 10

Compression:

Stored size: 684 Bytes

Contents

require 'spec_helper'

describe "directives" do

  it "executes arbitrary ruby code in a particular environment" do
    $env = 'staging'
    expect(self).to receive(:hello).exactly(1).times
    execute_in(env: 'staging')    { hello() }
    execute_in(env: 'production') { hello() }
  end

  it "creates a partial" do
    partial("hello_partial") { hello() }
    expect($partials["hello_partial"][:block]).to be_kind_of(Proc)
  end

  it "executes a partial" do
    expect(self).to receive(:hello).with("hello").exactly(1).times
    partial("hello_partial") { |args| hello(args[:x]) }
    execute_partial "hello_partial", x: 'hello'
  end

  it "passes before and after messages"

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
deplomat-0.1.13 spec/directives_spec.rb
deplomat-0.1.12 spec/directives_spec.rb
deplomat-0.1.11 spec/directives_spec.rb
deplomat-0.1.10 spec/directives_spec.rb
deplomat-0.1.8 spec/directives_spec.rb
deplomat-0.1.7 spec/directives_spec.rb
deplomat-0.1.6 spec/directives_spec.rb
deplomat-0.1.5 spec/directives_spec.rb
deplomat-0.1.3 spec/directives_spec.rb
deplomat-0.1.1 spec/directives_spec.rb