Sha256: 358cd3c1bb36d8f63c07b3fac38fa892d800feecd8ae340d6bc4b7d477263931

Contents?: true

Size: 1007 Bytes

Versions: 5

Compression:

Stored size: 1007 Bytes

Contents

require 'spec_helper'

# Generators are not automatically loaded by Rails
require 'generators/puffer/component/component_generator'

describe Puffer::ComponentGenerator do
  before { run_generator %w(password)  }

  describe 'app/components/password_component.rb' do
    subject { file('app/components/password_component.rb') }
    it { should exist }
    it { should contain "class PasswordComponent < Puffer::Component::Base" }
  end

  describe 'app/components/password/index.html.erb' do
    subject { file('app/components/password/index.html.erb') }
    it { should exist }
    it { should contain "# I'm index" }
  end

  describe 'app/components/password/form.html.erb' do
    subject { file('app/components/password/form.html.erb') }
    it { should exist }
    it { should contain "# I'm form" }
  end

  describe 'app/components/password/filter.html.erb' do
    subject { file('app/components/password/filter.html.erb') }
    it { should exist }
    it { should contain "# I'm filter" }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
puffer-0.1.1 spec/generators/puffer/component/component_generator_spec.rb
puffer-0.1.0 spec/generators/puffer/component/component_generator_spec.rb
puffer-0.0.32 spec/generators/puffer/component/component_generator_spec.rb
puffer-0.0.31 spec/generators/puffer/component/component_generator_spec.rb
puffer-0.0.30 spec/generators/puffer/component/component_generator_spec.rb