Sha256: 453c4aa8cf484c26e8273308aa8a267631868b033991ab47c522c22b65b61751

Contents?: true

Size: 398 Bytes

Versions: 6

Compression:

Stored size: 398 Bytes

Contents

require "spec_helper"
require "mvcli/erb"

describe "MVCLI::ERB" do
  Given(:erb) {MVCLI::ERB.new}
  context "when I compile a template" do
    Given(:output) {""}
    Given(:template) {erb.compile "name: <%= name %>"}
    context "and call it with a context" do
      When {template.call mock(:Context, :name => 'Charles'), output}
      Then {output.should eql "name: Charles"}
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mvcli-0.0.7 spec/mvcli/erb_spec.rb
mvcli-0.0.6 spec/mvcli/erb_spec.rb
mvcli-0.0.5 spec/mvcli/erb_spec.rb
mvcli-0.0.4 spec/mvcli/erb_spec.rb
mvcli-0.0.3 spec/mvcli/erb_spec.rb
mvcli-0.0.2 spec/mvcli/erb_spec.rb