Skip to content

Commit

Permalink
release notes for 0.1.0; fixes internal specs (removes old request sp…
Browse files Browse the repository at this point in the history
…ec assertions)"
  • Loading branch information
jasonfb committed Apr 28, 2021
1 parent ea132a0 commit dc1c81d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ If you do not want inline editing of your list items but instead to fall back to
# VERSION HISTORY
#### 2021-04-28 - v0.1.0 - Very please to introduce full behavior specs, found in specs/system/, generated by default on all build code; also many fixes involving nesting and authentication"
#### 2021-03-24 - v0.0.9 - fixes in the automatic field label detection; cleans up junk in spec output
#### 2021-03-21 - v0.0.8 - show only flag; more specific spec coverage in generator spec
Expand Down
14 changes: 3 additions & 11 deletions spec/lib/generators/hot_glue/scaffold_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,27 @@ def remove_everything
end

describe "--specs-only" do
it "should create a file at specs/requests/ and specs/system" do
it "should create a file specs/system" do
begin
response = Rails::Generators.invoke("hot_glue:scaffold",
["Def","--specs-only"])
rescue StandardError => e
expect("error building in spec #{e}")
end
expect(File.exist?("spec/dummy/spec/requests/defs_spec.rb")).to be(true)
expect(File.exist?("spec/dummy/spec/system/defs_behavior_spec.rb")).to be(true)

end
end


describe "--no-specs" do
it "should NOT create a file at specs/requests/ and specs/system" do
it "should NOT create a file at specs/system" do
begin
response = Rails::Generators.invoke("hot_glue:scaffold",
["Def","--no-specs"])
rescue StandardError => e
expect("error building in spec #{e}")
end
expect(File.exist?("spec/dummy/app/spec/system/defs_spec.rb")).to be(false)
expect(File.exist?("spec/dummy/app/spec/requests/defs_spec.rb")).to be(false)
end
end

Expand Down Expand Up @@ -158,7 +155,6 @@ def remove_everything
raise("error building in spec #{e}")
end
expect(File.exist?("spec/dummy/app/controllers/defs_controller.rb")).to be(true)
expect(File.exist?("spec/dummy/spec/requests/defs_spec.rb")).to be(true)
end
end
end
Expand Down Expand Up @@ -187,14 +183,13 @@ def remove_everything
expect(File.exist?("spec/dummy/app/views/hello/defs/destroy.turbo_stream.haml")).to be(true)
expect(File.exist?("spec/dummy/app/views/hello/defs/edit.turbo_stream.haml")).to be(true)
expect(File.exist?("spec/dummy/app/views/hello/defs/update.turbo_stream.haml")).to be(true)
expect(File.exist?("spec/dummy/spec/requests/hello/defs_spec.rb")).to be(true)
expect(File.exist?("spec/dummy/spec/system/hello/defs_behavior_spec.rb")).to be(true)
end
end


describe "--nest" do
it "should create a file at specs/requests/ and specs/system" do
it "should create a file at and specs/system" do
begin
response = Rails::Generators.invoke("hot_glue:scaffold",
["Ghi","--nest=def"])
Expand All @@ -204,9 +199,6 @@ def remove_everything

expect(File.exist?("spec/dummy/app/controllers/ghis_controller.rb")).to be(true)
expect(File.exist?("spec/dummy/spec/system/ghis_behavior_spec.rb")).to be(true)
expect(File.exist?("spec/dummy/spec/requests/ghis_spec.rb")).to be(true)


end
end

Expand Down

0 comments on commit dc1c81d

Please sign in to comment.