spec/commands_spec.rb in dev_commands-0.0.17 vs spec/commands_spec.rb in dev_commands-0.0.18

- old
+ new

@@ -1,7 +1,15 @@ -require_relative '../lib/commands.rb' - -describe Commands do - it "should be able to automatically generate commands for a particular directory" do - commands=Commands.new - end +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 \ No newline at end of file