Sha256: f907ec2806e087b12334956ec0a4271a34f2068bd68bf40ed85967c6db8e4948

Contents?: true

Size: 404 Bytes

Versions: 1

Compression:

Stored size: 404 Bytes

Contents

require 'spec_helper'

describe "Cmds::curry" do
  it "currys" do
    base = Cmds::Cmd.new "#{ ECHO_CMD } <%= x %> <%= y %>"

    x1 = base.curry x: 1
    x2 = base.curry x: 2

    expect( echo_cmd_argv x1.call y: 'why' ).to eq ['1', 'why']
    expect( echo_cmd_argv x2.call y: 'who' ).to eq ['2', 'who']
    expect( echo_cmd_argv base.call x: 3, y: 4 ).to eq ['3', '4']
  end # it currys
end # Cmds::run

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cmds-0.1.0 spec/cmds/curry_spec.rb