Sha256: 914d22bdf5f1d74af6889935b5bd358211d0dee370d0cd6cd4fcee2ec7ba805c

Contents?: true

Size: 887 Bytes

Versions: 5

Compression:

Stored size: 887 Bytes

Contents

require 'spec_helper'
require 'generative/rake_task'

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

5 entries across 5 versions & 1 rubygems

Version Path
generative-0.2.4 spec/generative/rake_task_spec.rb
generative-0.2.3 spec/generative/rake_task_spec.rb
generative-0.2.2 spec/generative/rake_task_spec.rb
generative-0.2.0 spec/generative/rake_task_spec.rb
generative-0.2.0.pre3 spec/generative/rake_task_spec.rb