|
1 |
| -# frozen_string_literal: true |
| 1 | +# # frozen_string_literal: true |
2 | 2 |
|
3 |
| -require 'generator_spec' |
4 |
| -require 'generators/matestack/core/component/component_generator' |
| 3 | +# require 'generator_spec' |
| 4 | +# require 'generators/matestack/core/component/component_generator' |
5 | 5 |
|
6 |
| -describe Matestack::Core::Generators::ComponentGenerator, type: :generator do |
7 |
| - let(:dummy) { File.expand_path(File.join(__FILE__, '..', '..', '..', '..', '..', '..', 'dummy')) } |
8 |
| - let(:dummy_copy) { File.expand_path(File.join(__FILE__, '..', '..', '..', '..', '..', '..', 'dummy_copy')) } |
| 6 | +# describe Matestack::Core::Generators::ComponentGenerator, type: :generator do |
| 7 | +# let(:dummy) { File.expand_path(File.join(__FILE__, '..', '..', '..', '..', '..', '..', 'dummy')) } |
| 8 | +# let(:dummy_copy) { File.expand_path(File.join(__FILE__, '..', '..', '..', '..', '..', '..', 'dummy_copy')) } |
9 | 9 |
|
10 |
| - before :each do |
11 |
| - FileUtils.cp_r dummy, dummy_copy |
12 |
| - end |
| 10 | +# before :each do |
| 11 | +# FileUtils.cp_r dummy, dummy_copy |
| 12 | +# end |
13 | 13 |
|
14 |
| - after :each do |
15 |
| - FileUtils.rm_rf dummy |
16 |
| - FileUtils.cp_r dummy_copy, dummy |
17 |
| - FileUtils.rm_rf dummy_copy |
18 |
| - end |
| 14 | +# after :each do |
| 15 | +# FileUtils.rm_rf dummy |
| 16 | +# FileUtils.cp_r dummy_copy, dummy |
| 17 | +# FileUtils.rm_rf dummy_copy |
| 18 | +# end |
19 | 19 |
|
20 |
| - destination Rails.root |
| 20 | +# destination Rails.root |
21 | 21 |
|
22 |
| - it 'creates a core component' do |
23 |
| - run_generator %w(div) |
| 22 | +# it 'creates a core component' do |
| 23 | +# run_generator %w(div) |
24 | 24 |
|
25 |
| - assert_file 'app/concepts/matestack/ui/core/div/div.rb', /module Matestack::Ui::Core::Div/ |
26 |
| - assert_file 'app/concepts/matestack/ui/core/div/div.rb', /class Div < Matestack::Ui::Core::Component::Static/ |
| 25 | +# assert_file 'app/concepts/matestack/ui/core/div/div.rb', /module Matestack::Ui::Core::Div/ |
| 26 | +# assert_file 'app/concepts/matestack/ui/core/div/div.rb', /class Div < Matestack::Ui::Core::Component::Static/ |
27 | 27 |
|
28 |
| - assert_file 'app/concepts/matestack/ui/core/div/div.haml', /%div{@tag_attributes}/ |
| 28 | +# assert_file 'app/concepts/matestack/ui/core/div/div.haml', /%div{@tag_attributes}/ |
29 | 29 |
|
30 |
| - assert_file 'spec/usage/components/div_spec.rb', /describe 'Div component', type: :feature, js: true do/ |
31 |
| - assert_file 'spec/usage/components/div_spec.rb', /div text: 'Simple div tag'/ |
32 |
| - assert_file 'spec/usage/components/div_spec.rb', %r{<div>Simple div tag</div>} |
33 |
| - assert_file 'spec/usage/components/div_spec.rb', /div id: 'my-id', class: 'my-class' do/ |
34 |
| - assert_file 'spec/usage/components/div_spec.rb', %r{<div id="my-id" class="my-class">Enhanced div tag</div>} |
| 30 | +# assert_file 'spec/usage/components/div_spec.rb', /describe 'Div component', type: :feature, js: true do/ |
| 31 | +# assert_file 'spec/usage/components/div_spec.rb', /div text: 'Simple div tag'/ |
| 32 | +# assert_file 'spec/usage/components/div_spec.rb', %r{<div>Simple div tag</div>} |
| 33 | +# assert_file 'spec/usage/components/div_spec.rb', /div id: 'my-id', class: 'my-class' do/ |
| 34 | +# assert_file 'spec/usage/components/div_spec.rb', %r{<div id="my-id" class="my-class">Enhanced div tag</div>} |
35 | 35 |
|
36 |
| - assert_file 'docs/components/div.md', /# matestack core component: Div/ |
37 |
| - assert_file 'docs/components/div.md', %r{Show \[specs\]\(/spec/usage/components/div_spec.rb\)} |
38 |
| - assert_file 'docs/components/div.md', /The HTML `<div>` tag implemented in ruby./ |
39 |
| - assert_file 'docs/components/div.md', /Expects a string with all ids the `<div>` should have./ |
40 |
| - assert_file 'docs/components/div.md', /Expects a string with all classes the `<div>` should have./ |
41 |
| - assert_file 'docs/components/div.md', /div id: 'foo', class: 'bar' do/ |
42 |
| - assert_file 'docs/components/div.md', /div id: 'foo', class: 'bar', text: 'Div example 2'/ |
43 |
| - assert_file 'docs/components/div.md', /<div id="foo" class="bar">/ |
| 36 | +# assert_file 'docs/components/div.md', /# matestack core component: Div/ |
| 37 | +# assert_file 'docs/components/div.md', %r{Show \[specs\]\(/spec/usage/components/div_spec.rb\)} |
| 38 | +# assert_file 'docs/components/div.md', /The HTML `<div>` tag implemented in ruby./ |
| 39 | +# assert_file 'docs/components/div.md', /Expects a string with all ids the `<div>` should have./ |
| 40 | +# assert_file 'docs/components/div.md', /Expects a string with all classes the `<div>` should have./ |
| 41 | +# assert_file 'docs/components/div.md', /div id: 'foo', class: 'bar' do/ |
| 42 | +# assert_file 'docs/components/div.md', /div id: 'foo', class: 'bar', text: 'Div example 2'/ |
| 43 | +# assert_file 'docs/components/div.md', /<div id="foo" class="bar">/ |
44 | 44 |
|
45 |
| - assert_file 'docs/components/README.md', %r{- \[div\]\(/docs/components/div.md\)} |
46 |
| - end |
47 |
| -end |
| 45 | +# assert_file 'docs/components/README.md', %r{- \[div\]\(/docs/components/div.md\)} |
| 46 | +# end |
| 47 | +# end |
0 commit comments