Sha256: 32c00bf8558db27aed0e5e411184b294b41ccf08ed71ca877973499987bfb6ba

Contents?: true

Size: 788 Bytes

Versions: 4

Compression:

Stored size: 788 Bytes

Contents

require 'spec_helper'

describe "rails helpers" do

  let(:template)    { load_fixture :rails_helper }
  let(:haml_output) { load_fixture :rails_helper_output_haml, :html }
  let(:erb_output)  { load_fixture :rails_helper_output_erb, :html }

  describe "haml" do

    it "are accessible within haml templates" do
      Shortcode.process(template).gsub("\n",'').should == haml_output.gsub("\n",'')
    end

  end

  describe "erb" do

    before(:each) do
      Shortcode.setup do |config|
        config.template_parser = :erb
        config.template_path = File.join File.dirname(__FILE__), "support/templates/erb"
      end
    end

    it "are accessible within haml templates" do
      Shortcode.process(template).gsub("\n",'').should == erb_output.gsub("\n",'')
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shortcode-0.3.0 spec/rails_helpers_spec.rb
shortcode-0.2.0 spec/rails_helpers_spec.rb
shortcode-0.1.2 spec/rails_helpers_spec.rb
shortcode-0.1.1 spec/rails_helpers_spec.rb