Sha256: 0ba8a646d36864f41f4466326c3630e57173c2bd82a9dd982663b977057c920c
Contents?: true
Size: 759 Bytes
Versions: 10
Compression:
Stored size: 759 Bytes
Contents
# encoding: utf-8 RSpec.configure do |config| # Array of commands that was sent to system # # @return [Array<String>] def commands @commands ||= [] end # Checks whether a task with given name has been invoked # # @param [String] name # # @return [Boolean] def task_invoked?(name) Rake::Task[name].instance_eval { @already_invoked } end config.before :example, :tasks do # Resets Rake application and reinstalls all tasks to be available Rake.application = nil Hexx::Suit.install_tasks # Captures commands that System utility sends to system # and stores them in {#commands} array. allow_any_instance_of(Hexx::RSpec::System) .to receive(:system) { |command| commands << command } end end
Version data entries
10 entries across 10 versions & 1 rubygems