Sha256: 517055cb12572a155af13cc10bb82eca48b969e5320409a39216dbd4b78ade2c

Contents?: true

Size: 264 Bytes

Versions: 1

Compression:

Stored size: 264 Bytes

Contents

module ViewDefinitionHelpers
  def with_view_definition(name, version, schema)
    view_file = ::Rails.root.join("db", "views", "#{name}_v#{version}.sql")
    File.open(view_file, "w") { |f| f.write(schema) }
    yield
  ensure
    File.delete view_file
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scenic-0.1.0 spec/support/view_definition_helpers.rb