Sha256: fe76cc0343ed5aa9235858963afbbab37bbe230ac5e6074ff6d1bbd37b1c6422

Contents?: true

Size: 701 Bytes

Versions: 27

Compression:

Stored size: 701 Bytes

Contents

# frozen_string_literal: true

# {{camel cmdlet.name}}: {{cmdlet.description}}
RSpec.describe Handlebarsjs::Helpers::{{camel cmdlet.category}}::{{camel cmdlet.name}} do
  let(:helper_name) { :{{cmdlet.name}} }
  let(:helper) { described_class.new }
  let(:handlebars) { Handlebarsjs::Handlebars.new }
  
  before { handlebars.handlebars_snapshot.add_helper(helper_name, helper) }

  describe '#process_template' do
    subject { handlebars.process_template(template, data).squish }

    let(:lhs) { nil }
    let(:rhs) { nil }
    let(:data) { { lhs: lhs, rhs: rhs } }

    let(:template) do
      <<~TEXT.chomp
        {{#if (and lhs rhs)}}
        {{^}}
        {{/if}}
      TEXT
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
cmdlet-0.14.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.13.2 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.13.1 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.13.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.12.5 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.12.4 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.12.3 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.12.2 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.12.1 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.12.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.11.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.10.1 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.10.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.9.2 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.9.1 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.9.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.8.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.7.1 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.7.0 .builders/.templates/handlebars_helper_spec.rb
cmdlet-0.6.2 .builders/.templates/handlebars_helper_spec.rb