From 67e9ec2c6413a5cd19e6a0b81d3a218dd1d2ec27 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 20 Jan 2013 20:34:29 -0500 Subject: [PATCH] start working on parse() --- lib/yawpa.rb | 5 ++++- spec/yawpa_spec.rb | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/yawpa.rb b/lib/yawpa.rb index 7ac7c07..6c6ffaa 100644 --- a/lib/yawpa.rb +++ b/lib/yawpa.rb @@ -1,5 +1,8 @@ require "yawpa/version" module Yawpa - # Your code goes here... + module_function + def parse(config, params) + return [[], params] + end end diff --git a/spec/yawpa_spec.rb b/spec/yawpa_spec.rb index 7d6c58c..5c30f03 100644 --- a/spec/yawpa_spec.rb +++ b/spec/yawpa_spec.rb @@ -1,5 +1,11 @@ require 'spec_helper' describe Yawpa do - pending "write it" + describe 'parse' do + it "returns everything as arguments when no options present" do + config = { } + params = ['one', 'two', 'three', 'four'] + Yawpa.parse(config, params).should eq([[], params]) + end + end end