Sha256: b92a54c9ac89196173d1c2f894b7ec0d2e4b40da53b9d7d0c4acf805466c71c2
Contents?: true
Size: 724 Bytes
Versions: 2
Compression:
Stored size: 724 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(Hexx::RSpec).to receive(:[]) { |command| commands << command } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hexx-suit-2.3.2 | spec/support/tasks.rb |
hexx-suit-2.3.0 | spec/support/tasks.rb |