jasmine-headless-webkit/spec/lib/jasmine/headless/coffee_script_cache_spec.rb
2011-09-01 10:39:29 -04:00

22 lines
472 B
Ruby

require 'spec_helper'
describe Jasmine::Headless::CoffeeScriptCache do
include FakeFS::SpecHelpers
describe '#action' do
let(:file) { 'file' }
let(:data) { 'data' }
let(:compiled) { 'compiled' }
before do
CoffeeScript.expects(:compile).with(data).returns(compiled)
File.open(file, 'wb') { |fh| fh.print(data) }
end
it 'should compile coffeescript' do
described_class.new(file).action.should == compiled
end
end
end