Module: GitCommander::RSpec::PluginHelpers

Defined in:
lib/git_commander/rspec/plugin_helpers.rb

Overview

Contains helper methods and matchers for testing git-commander plugins

Defined Under Namespace

Classes: MockGemfile

Instance Method Summary collapse

Instance Method Details

#stub_inline_gemfileObject



55
56
57
58
59
60
61
# File 'lib/git_commander/rspec/plugin_helpers.rb', line 55

def stub_inline_gemfile
  mock_gemfile = MockGemfile.new
  allow_any_instance_of(GitCommander::Plugin::Loader).to receive(:gemfile) do |*args, &block|
    mock_gemfile.instance_eval(&block)
  end
  mock_gemfile
end