jasmine-headless-webkit/spec/lib/jasmine/headless/jst_template_spec.rb

22 lines
447 B
Ruby
Raw Permalink Normal View History

require 'spec_helper'
describe Jasmine::Headless::JSTTemplate do
include FakeFS::SpecHelpers
let(:template) { described_class.new(file) }
let(:file) { 'file' }
let(:data) { 'data' }
let(:context) { stub(:logical_path => 'path') }
before do
File.open(file, 'wb') { |fh| fh.print data }
end
subject { template.render(context) }
it { should include(%{<script type="text/javascript">}) }
it { should include(data) }
end