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