Sha256: fce8064f0ab6390b2091f666bb1e3897a4e3b4dd1f68fa8a4b24e2fb91c09fd8

Contents?: true

Size: 805 Bytes

Versions: 4

Compression:

Stored size: 805 Bytes

Contents

require 'spec_helper'

describe RailsTemplater::TemplateEngine do
  
  context "Template Engine type has not been set" do
    its(:type) { should == :haml }
  end

  context "Template Engine type has been set to Haml" do
  
    before(:each) do
      subject.type = :haml
    end
    
    it { should be_haml }
  
  end
  
  context "Template Engine type has been set to Slim" do
  
    before(:each) do
      subject.type = :slim
    end
    
    it { should be_slim }
  
  end
  
  context "Template Engine type has been set to ERb" do
  
    before(:each) do
      subject.type = :erb
    end
    
    it { should be_erb }
  
  end
  
  it "only sets type to supported Template Engines" do
    expect{
      subject.type = :random
    }.to raise_error(RailsTemplater::NotSupportedError)
  end
  
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_templater-0.3.0 spec/rails_templater/template_engine_spec.rb
rails_templater-0.2.1 spec/rails_templater/template_engine_spec.rb
rails_templater-0.2.0 spec/rails_templater/template_engine_spec.rb
rails_templater-0.1.2 spec/rails_templater/template_engine_spec.rb