Sha256: f582657e61e1e12f6d300de6d3f3858fe9e1e2284cecbf4cf531cefaa3ab3a29

Contents?: true

Size: 893 Bytes

Versions: 1

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'
require 'generative/rake_task'

RSpec.describe Generative::RakeTask do
  let(:task) { Generative::RakeTask.new(*args) }
  let(:args) { [] }

  describe "name" do
    subject(:name) { task.name }

    it "has a default" do
      expect(name).to eq(:generative)
    end

    context "when passed a name" do
      let(:args) { [:properties] }

      it "uses that name" do
        expect(name).to eq(:properties)
      end
    end
  end

  describe "rspec_opts" do
    subject(:rspec_opts) { task.rspec_opts }

    it "require generative" do
      expect(rspec_opts).to include("--require generative")
    end

    it "format with Generative::Formatter" do
      expect(rspec_opts).to include("--format Generative::Formatter")
    end

    it "only run specs tagged with generative" do
      expect(rspec_opts).to include("--format Generative::Formatter")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generative-0.2.5 spec/generative/rake_task_spec.rb