require_relative '../lib/commands.rb' describe Commands do it "should be able to automatically generate commands for a particular directory" do dir='spec/gem-example' expect(File.exists?("#{dir}/rakefile.rb")).to eq(true) Dir.chdir(dir) do commands=Commands.new expect(commands.has_key?(:pull)).to eq(true) commands[:pull].update expect(commands[:pull].length).to eq(0) end end end