Sha256: 80b744ce90389d9bf59b40f7090340e4deac3d6fb9d2ffd821e55d36b011445f

Contents?: true

Size: 825 Bytes

Versions: 10

Compression:

Stored size: 825 Bytes

Contents

require 'spec_helper'
require 'jasmine/template_writer'
require 'fakefs/spec_helpers'

describe Jasmine::TemplateWriter do
  describe '.write!' do
    include FakeFS::SpecHelpers

    let(:files_list) { Jasmine::FilesList.new }

    before do
      files_list.files << 'file.js'
      files_list.filtered_files << 'file.js'
    end

    context 'no filter' do
      it 'should write one file' do
        Jasmine::TemplateWriter.write!(files_list).should == [
          "specrunner.#{$$}.html"
        ]
      end
    end

    context 'filtered files' do
      before do
        files_list.files << 'file2.js'
      end

      it 'should write two files' do
        Jasmine::TemplateWriter.write!(files_list).should == [
          "specrunner.#{$$}.filter.html", "specrunner.#{$$}.html"
        ]
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jasmine-headless-webkit-0.7.1 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.7.0 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.6.3 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.6.2 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.6.1 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.6.0 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.5.0 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.4.2 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.4.1 spec/lib/jasmine/template_writer_spec.rb
jasmine-headless-webkit-0.4.0 spec/lib/jasmine/template_writer_spec.rb