lib/aruba/api/core.rb in aruba-0.14.9 vs lib/aruba/api/core.rb in aruba-0.14.10

- old
+ new

@@ -1,12 +1,10 @@ require 'rspec/expectations' require 'aruba/runtime' require 'aruba/errors' require 'aruba/setup' -require 'aruba/config/jruby' - # Aruba module Aruba # Api module Api # Core methods of aruba @@ -27,9 +25,18 @@ # directory. def setup_aruba(clobber = true) Aruba::Setup.new(aruba).call(clobber) self + end + + # Execute block in Aruba's current directory + # + # @yield + # The block which should be run in current directory + def in_current_directory(&block) + create_directory '.' unless directory?('.') + cd('.', &block) end # Switch to directory # # @param [String] dir