Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevelito committed Feb 11, 2025
1 parent 5304baf commit 85e1fa8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/features/avo/generators/resource_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@
keeping_original_files(files) do
Rails::Generators.invoke("avo:resource", ["review", "-q", "-s"], {destination_root: Rails.root})

expect(File.read(files[0])).to include("field :reviewable, as: :belongs_to, polymorphic_as: :reviewable, types: [:Team, :Project, :Post, :Fish]")
# Types load in different order every time
expect(File.read(files[0])).to include("field :reviewable, as: :belongs_to, polymorphic_as: :reviewable, types:")
expect(File.read(files[0])).to include(":Team")
expect(File.read(files[0])).to include(":Project")
expect(File.read(files[0])).to include(":Post")
expect(File.read(files[0])).to include(":Fish")

check_files_and_clean_up files
end
Expand Down

0 comments on commit 85e1fa8

Please sign in to comment.