Sha256: 8032b14d6e32c628d37796af9aa0a5d6860780d68231ccfb87b05aa86ad11b95

Contents?: true

Size: 327 Bytes

Versions: 18

Compression:

Stored size: 327 Bytes

Contents

module ViewDefinitionHelpers
  def with_view_definition(name, version, schema)
    definition = Scenic::Definition.new(name, version)
    FileUtils.mkdir_p(File.dirname(definition.full_path))
    File.open(definition.full_path, "w") { |f| f.write(schema) }
    yield
  ensure
    FileUtils.rm_f(definition.full_path)
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
scenic-1.7.0 spec/support/view_definition_helpers.rb
scenic-1.6.0 spec/support/view_definition_helpers.rb
scenic-1.5.5 spec/support/view_definition_helpers.rb
scenic-jets-1.5.5 spec/support/view_definition_helpers.rb
scenic-jets-1.5.4 spec/support/view_definition_helpers.rb
scenic-1.5.4 spec/support/view_definition_helpers.rb
scenic-1.5.3 spec/support/view_definition_helpers.rb
scenic-1.5.2 spec/support/view_definition_helpers.rb
scenic-1.5.1 spec/support/view_definition_helpers.rb
scenic-1.5.0 spec/support/view_definition_helpers.rb
scenic-1.4.1 spec/support/view_definition_helpers.rb
scenic-1.4.0 spec/support/view_definition_helpers.rb
scenic-1.3.0 spec/support/view_definition_helpers.rb
scenic-1.2.0 spec/support/view_definition_helpers.rb
scenic-1.1.1 spec/support/view_definition_helpers.rb
scenic-1.1.0 spec/support/view_definition_helpers.rb
scenic-1.0.0 spec/support/view_definition_helpers.rb
scenic-0.3.0 spec/support/view_definition_helpers.rb