Sha256: a25436d307af00b591936eb9d8f31ae8e222ff8dab0c9e699fea011afd8a80ec

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

require 'spec_helper'
require 'ronin/templates/erb'

require 'templates/classes/example_erb'

describe Templates::Erb do
  subject { ExampleErb.new }

  before do
    subject.x = 2
    subject.y = 3
  end

  it "should render inline ERB templates" do
    expect(subject.erb(%{<%= 'hello' %>})).to eq('hello')
  end

  it "should render ERB templates using the binding of the object" do
    expect(subject.erb(%{<%= @x %> <%= @y %>})).to eq('2 3')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ronin-support-0.5.2 spec/templates/erb_spec.rb