Sha256: ee05af7364e5d1ca0b57174828959b20c6059a2eab85ad8bf477e101127107ed
Contents?: true
Size: 754 Bytes
Versions: 1
Compression:
Stored size: 754 Bytes
Contents
require "spec_helper" require "generators/scenic/view/view_generator" describe Scenic::Generators::ViewGenerator, :generator do it "creates view definition and migration files" do migration = file("db/migrate/create_searches.rb") view_definition = file("db/views/searches_v01.sql") run_generator ["search"] expect(migration).to be_a_migration expect(view_definition).to exist end it "updates an existing view" do with_view_definition("searches", 1, "hello") do migration = file("db/migrate/update_searches_to_version_2.rb") view_definition = file("db/views/searches_v02.sql") run_generator ["search"] expect(migration).to be_a_migration expect(view_definition).to exist end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scenic-0.3.0 | spec/generators/scenic/view/view_generator_spec.rb |