Sha256: 76d922de1a04390f29f6966947b76f4f5fa54f0c98c8d68f3a7ba8ba17f00e9b

Contents?: true

Size: 1.14 KB

Versions: 19

Compression:

Stored size: 1.14 KB

Contents

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

describe Card::Set::Type::JavaScript do
  let(:js)                    { 'alert( "Hi" );'    }
  let(:compressed_js)         { 'alert("Hi");'      }
  let(:changed_js)            { 'alert( "Hello" );' }
  let(:compressed_changed_js) { 'alert("Hello");'   }

  it_should_behave_like 'content machine', that_produces_js do
    let(:machine_card) do
      Card.gimme! 'test javascript', type: :java_script, content: js
    end
    let(:card_content) do
      { in:         js,         out:     compressed_js,
        changed_in: changed_js, changed_out: compressed_changed_js }
    end
  end

  it_behaves_like 'machine input' do
    let(:create_machine_input_card) do
      Card.gimme! 'test javascript', type: :java_script, content: js
    end
    let(:create_another_machine_input_card) do
      Card.gimme! 'more javascript', type: :java_script, content: js
    end
    let(:create_machine_card) do
      Card.gimme! 'script with js+*script', type: :pointer
    end
    let(:card_content) do
      { in:         js,         out:     compressed_js,
        changed_in: changed_js, changed_out: compressed_changed_js }
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
card-1.18.6 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.18.5 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.18.4 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.18.3 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.18.2 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.18.1 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.18.0 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.17.4 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.17.3 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.17.2 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.17.1 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.17.0 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.15 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.14 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.13 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.12 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.11 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.10 mod/03_machines/spec/set/type/javascript_spec.rb
card-1.16.9 mod/03_machines/spec/set/type/javascript_spec.rb