Sha256: f05e1a6d0cf18d8dbbba615248f1bfd3b95a772b6d9eec2c749a570c805be1b3

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

require "spec_helper"

RSpec.describe Template::Parser::Template do
  subject { described_class.new.parse(input) }

  [
    ["hello", [{ text: "hello" }]],
    ["hello {name}", [{ text: "hello " }, { code: [{ name: "name" }] }]],
    ["{name", [{ code: [{ name: "name" }] }]]
  ].each do |(input, expected)|
    context input.inspect do
      let(:input) { input }

      it "succeeds" do
        expect(subject).to eq(expected)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
template-ruby-0.1.0 spec/template/parser/template_spec.rb