Sha256: 58bc5b4891d5fc95c80af0aa7c671b59138bd58863a34ba72d06bef7f4b23274

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

require 'generator_spec'
require 'generators/dashing/widget_generator'

RSpec.describe Dashing::Generators::WidgetGenerator do

  arguments %w(test_widget)

  before do
    run_generator
  end

  after do
    `find #{Rails.root.join('app')} -name "test_widget.*" -delete`
  end

  it 'creates widget files' do
    assert_file Rails.root.join 'app/views/dashing/widgets/test_widget.html'
    assert_file Rails.root.join 'app/assets/javascripts/dashing/widgets/test_widget.coffee'
    assert_file Rails.root.join 'app/assets/stylesheets/dashing/widgets/test_widget.scss'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dashing-rails-2.6.2 spec/lib/generators/widget_generator_spec.rb
dashing-rails-2.6.1 spec/lib/generators/widget_generator_spec.rb
dashing-rails-2.6.0 spec/lib/generators/widget_generator_spec.rb