Sha256: c472bfe5cee9c6e59fe693c8d8a849c7dd750069d110b668a3e9384143639c2f

Contents?: true

Size: 685 Bytes

Versions: 4

Compression:

Stored size: 685 Bytes

Contents

module MockHelpers

  def mock_default_window
    allow_any_instance_of(described_class).to receive(:default_window) { true }
  end

  def use_test_storage_file
    Daigaku::Configuration.send(:new)
    Daigaku.config.instance_variable_set(:@storage_file, local_storage_file)

    QuickStore.configure do |config|
      config.file_path = Daigaku.config.storage_file
    end

    QuickStore.store.send(:new)
  end

  def suppress_print_out
    allow(described_class).to receive(:say_warning) {}
    allow(described_class).to receive(:say_info) {}
    allow(described_class).to receive(:say) {}
    allow($stdout).to receive(:puts) {}
    allow($stdout).to receive(:print) {}
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
daigaku-0.3.0 spec/support/macros/mock_helpers.rb
daigaku-0.2.0 spec/support/macros/mock_helpers.rb
daigaku-0.1.1 spec/support/macros/mock_helpers.rb
daigaku-0.1.0 spec/support/macros/mock_helpers.rb