Sha256: 22e402879d7cf1fed8397e50db69b9bc033002485d42f0a3c00f50dc3b20bb7b
Contents?: true
Size: 629 Bytes
Versions: 2
Compression:
Stored size: 629 Bytes
Contents
require 'spec_helper' describe "events/index.js.coffee" do it "interpolates strings" do assign :first_name, "Yury" assign :last_name, "'Korolev'" render rendered.should == <<-JAVASCRIPT (function() { alert("hello, " + "Yury" + " " + 'Korolev'); }).call(this); JAVASCRIPT end end describe "events/show.js.coffee" do it "converts to json" do assign :event, {name: "Birth day", date: Date.new(1983, 02, 15)} render rendered.should == <<-JAVASCRIPT (function() { var event, owner_id; event = {"name":"Birth day","date":"1983-02-15"}; owner_id = 100; }).call(this); JAVASCRIPT end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
coffee-views-0.1.3 | spec/views/events_spec.rb |
coffee-views-0.1.2 | spec/views/events_spec.rb |