Sha256: 6a28b80dd4608443f1b518273fd30af35d39c69e119d847257b4a451975188ca

Contents?: true

Size: 590 Bytes

Versions: 23

Compression:

Stored size: 590 Bytes

Contents

require 'spec_helper'
require 'generators/rspec/enum/enum_generator'

describe Rspec::Generators::EnumGenerator, :type => :generator do
  it "should run all tasks in the generator" do
    gen = generator %w(foo_bar)
    expect(gen).to receive(:create_enum_spec)
    capture(:stdout) { gen.invoke_all }
  end

  describe "the generated files" do
    describe "the spec" do
      describe "with defaults" do
        before do
          run_generator %w(foo_bar)
        end

        subject { file('spec/enums/foo_bar_enum_spec.rb') }

        it { should exist }
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
riveter-0.0.5 spec/generators/rspec/enum/enum_generator_spec.rb
riveter-0.0.4 spec/generators/rspec/enum/enum_generator_spec.rb
riveter-0.0.3 spec/generators/rspec/enum/enum_generator_spec.rb