Sha256: 67b749163b8307106dc791139e81b6d893ab0b5550a429f0002aca4681ed7ca1

Contents?: true

Size: 1.17 KB

Versions: 26

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

unless ENV['CI'] == 'true'
  # SimpleCov::Formatter::Codecov # For CI
  require 'simplecov'
  SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
  SimpleCov.start
end

require 'howzit'
require 'cli-test'

RSpec.configure do |c|
  c.expect_with(:rspec) { |e| e.syntax = :expect }

  c.before(:each) do
    allow(FileUtils).to receive(:remove_entry_secure).with(anything)
    save_buildnote
    Howzit.options[:include_upstream] = false
    Howzit.options[:default] = true
    @hz = Howzit.buildnote
  end

  c.after(:each) do
    delete_buildnote
  end
end

def save_buildnote
  note = <<~EONOTE
    # Howzit Test

    ## Topic Balogna

    @before
    This should be a prerequisite.
    @end

    @run(ls -1 &> /dev/null) Null Output
    @include(Topic Tropic)

    @after
    This should be a postrequisite.
    @end

    ## Topic Banana

    This is just another topic.

    - It has a list in it
    - That's pretty fun, right?

    ## Topic Tropic

    Bermuda, Bahama, something something wanna.
    @copy(Balogna) Just some balogna
  EONOTE
  File.open('builda.md', 'w') { |f| f.puts note }
end

def delete_buildnote
  FileUtils.rm('builda.md')
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
howzit-2.1.6 spec/spec_helper.rb
howzit-2.1.5 spec/spec_helper.rb
howzit-2.1.4 spec/spec_helper.rb
howzit-2.1.3 spec/spec_helper.rb
howzit-2.1.2 spec/spec_helper.rb
howzit-2.1.1 spec/spec_helper.rb
howzit-2.1.0 spec/spec_helper.rb
howzit-2.0.34 spec/spec_helper.rb
howzit-2.0.33 spec/spec_helper.rb
howzit-2.0.32 spec/spec_helper.rb
howzit-2.0.31 spec/spec_helper.rb
howzit-2.0.30 spec/spec_helper.rb
howzit-2.0.29 spec/spec_helper.rb
howzit-2.0.28 spec/spec_helper.rb
howzit-2.0.27 spec/spec_helper.rb
howzit-2.0.26 spec/spec_helper.rb
howzit-2.0.25 spec/spec_helper.rb
howzit-2.0.24 spec/spec_helper.rb
howzit-2.0.23 spec/spec_helper.rb
howzit-2.0.22 spec/spec_helper.rb