Sha256: 77fde5ac6dc8d2d264a936f52100fcb2a31ad6c2ffdc8834bb3dde9ca57c9f3f
Contents?: true
Size: 676 Bytes
Versions: 1
Compression:
Stored size: 676 Bytes
Contents
require 'spec_helper' describe Opal::Rails::Processor do it "is registered for '.opal' files" do Tilt['test.opal'].should eq(Opal::Rails::Processor) end it "is registered for '.rb' files" do Tilt['test.rb'].should eq(Opal::Rails::Processor) end it "compiles and evaluates the template on #render" do template = Opal::Rails::Processor.new { |t| "puts 'Hello, World!'\n" } template.render.should include('self.$puts("Hello, World!")') end it "can be rendered more than once" do template = Opal::Rails::Processor.new { |t| "puts 'Hello, World!'\n" } 3.times { template.render.should include('self.$puts("Hello, World!")') } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opal-rails-0.1.0 | spec/opal/rails/processor_spec.rb |