Sha256: 4d2cbc9b252dbc473a328f49d412b2a16fd1b7784ee9ebd2b2c07045e365092d

Contents?: true

Size: 480 Bytes

Versions: 1

Compression:

Stored size: 480 Bytes

Contents

require "spec_helper"
require "generators/scenic/view/view_generator"

describe Scenic::Generators::ViewGenerator, :generator do
  it "creates a view definition file" do
    run_generator ["search"]
    view_definition = file("db/views/searches_v1.sql")
    expect(view_definition).to exist
  end

  it "creates a migration to create the view" do
    run_generator ["search"]
    migration = file("db/migrate/create_searches.rb")
    expect(migration).to be_a_migration
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scenic-0.1.0 spec/generators/scenic/view/view_generator_spec.rb