Sha256: 4970907c2f972b598781fb9f97e261b31ff88ca670bd24ff25296df6178b23b3

Contents?: true

Size: 1.22 KB

Versions: 14

Compression:

Stored size: 1.22 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

14 entries across 14 versions & 1 rubygems

Version Path
card-1.17.4 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.17.3 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.17.2 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.17.1 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.17.0 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.15 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.14 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.13 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.12 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.11 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.10 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.9 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.8 mod/03_machines/spec/set/type/coffeescript_spec.rb
card-1.16.7 mod/03_machines/spec/set/type/coffeescript_spec.rb