Sha256: b97614db1b94a2caa82187afb725a54a7111f832d69548d6409902302b433378
Contents?: true
Size: 690 Bytes
Versions: 7
Compression:
Stored size: 690 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' require "thor" require "thor/tasks" # bleh. testing private methods? class <<Thor public :convert_task_options end describe "thor" do describe "convert_task_options" do it "turns true values into a flag" do Thor.convert_task_options(:color => true).must == "--color" end it "ignores nil" do Thor.convert_task_options(:color => nil).must == "" end it "ignores false" do Thor.convert_task_options(:color => false).must == "" end it "writes --name value for anything else" do Thor.convert_task_options(:format => "specdoc").must == %{--format "specdoc"} end end end
Version data entries
7 entries across 7 versions & 2 rubygems