Sha256: 9030270dcd8c57e4de780a42f8da1e730e4a3ee95d66c6eb75698fe6f59d437f

Contents?: true

Size: 992 Bytes

Versions: 2

Compression:

Stored size: 992 Bytes

Contents

# encoding: utf-8

describe Hexx::RSpec::Install, :sandbox do

  describe ".start", :capture do

    before { try_in_sandbox { described_class.start options } }

    context "without options" do

      let(:options) { %w() }

      it "creates main files" do
        %w(.rspec config/metrics/simplecov.yml spec/spec_helper.rb)
          .each { |file| expect(file).to be_present_in_sandbox }
      end

      it "adds Hexx::RSpec tasks loader to Rakefile" do
        expect(read_in_sandbox "Rakefile").to include "Hexx::RSpec.install"
      end

    end # context

    context "--no-rakefile" do

      let(:options) { %w(--no-rakefile) }

      it "creates main files" do
        %w(.rspec config/metrics/simplecov.yml spec/spec_helper.rb)
          .each { |file| expect(file).to be_present_in_sandbox }
      end

      it "doesn't create a Rakefile" do
        expect("Rakefile").to be_absent_in_sandbox
      end

    end # context

  end # describe .install

end # describe Hexx::RSpec

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hexx-rspec-0.5.2 spec/unit/lib/install_spec.rb
hexx-rspec-0.5.1 spec/unit/lib/install_spec.rb