Sha256: 53e25082a5262ac913fd3d26fee64ef0a3ae934327aa779d017dfa6f0cc68f22

Contents?: true

Size: 1.24 KB

Versions: 17

Compression:

Stored size: 1.24 KB

Contents

# -*- encoding : utf-8 -*-


describe Card::Set::Type::CoffeeScript do
  let(:coffee)                    { 'alert "Hi"  '    }
  let(:compressed_coffee)         { '(function(){alert("Hi")}).call(this);'    }
  let(:changed_coffee)            { 'alert "Hello"  ' }
  let(:compressed_changed_coffee) { '(function(){alert("Hello")}).call(this);' }


  it_should_behave_like 'content machine', that_produces_js do
    let(:machine_card)  { Card.gimme! "test coffeescript", :type => Card::CoffeeScriptID, :content => coffee}
    let(:card_content) do
       { in:           coffee,         out:     compressed_coffee, 
         changed_in:   changed_coffee, changed_out: compressed_changed_coffee }
    end
  end

  it_behaves_like "machine input"  do
    let(:create_machine_input_card) { Card.gimme! "test coffeescript", :type => :coffee_script, :content => coffee }
    let(:create_another_machine_input_card) { Card.gimme! "more coffee", :type => :coffee_script, :content => coffee }
    let(:create_machine_card)  { Card.gimme! "script with coffee+*script", :type => :pointer }
    let(:card_content) do
       { in:           coffee,         out:     compressed_coffee, 
         changed_in:   changed_coffee, changed_out: compressed_changed_coffee }
    end
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
card-1.16.6 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.5 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.4 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.3 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.2 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.1 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.0 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.7 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.6 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.5 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.4 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.3 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.2 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.1 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.0 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.pre2 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.15.pre mod/03_machines/spec/set/type/coffeescript_spec.rb