spec/embork/borkfile_spec.rb in embork-0.0.4 vs spec/embork/borkfile_spec.rb in embork-0.0.5

- old
+ new

@@ -40,10 +40,24 @@ end it 'has no es6 module namespace defined' do expect(borkfile.es6_namespace).to eq(nil) end + + it 'has no default compressor' do + expect(borkfile.compressor).to eq(nil) + end + + it 'has no default es6 transform' do + expect(borkfile.es6_transform).to eq(nil) + end + + it 'has no default phrender configuration' do + expect(borkfile.phrender_index_file).to eq(nil) + expect(borkfile.phrender_javascript_paths).to be_empty + expect(borkfile.phrender_raw_javascript).to be_empty + end end describe 'basic config' do let(:borkfile) { Embork::Borkfile.new full_borkfile_path } @@ -96,9 +110,26 @@ end it 'includes frameworks' do expect(borkfile.frameworks).to include 'bootstrap' expect(borkfile.frameworks).not_to include 'compass' + end + + it 'configures the closure_compiler as the compressor' do + expect(borkfile.compressor).to eq(:closure_compiler) + end + + it 'includes the specified es6 transform' do + expect(borkfile.es6_transform.respond_to? :call).to eq(true) + end + + it 'respects the phrender configuration ' do + expect(borkfile.phrender_index_file).to eq('phrender.html') + expect(borkfile.phrender_javascript_paths).to match_array [ + 'application.js', + :ember_driver + ] + expect(borkfile.phrender_raw_javascript).to include("require('index');") end end describe 'relative root' do let(:borkfile) { Embork::Borkfile.new relative_root_borkfile_path }