Sha256: 1983b6638ecfd5b42d575fc2576d730a406a9ceb065ce54d7ff45344c79345eb

Contents?: true

Size: 804 Bytes

Versions: 8

Compression:

Stored size: 804 Bytes

Contents

require 'selections'
require "nokogiri"

ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
ActiveRecord::Migration.create_table :selections do |t|
  t.string :name
  t.string :system_code
  t.integer :parent_id
  t.datetime :archived_at
  t.integer :position_value
  t.boolean :is_default
  t.timestamps
end
ActiveRecord::Base.send(:include, ActsAsTree)

ActiveRecord::Migration.create_table :tickets do |t|
  t.string :name
  t.integer :parent_id
  t.integer :priority_id
  t.timestamps
end

class Selection < ActiveRecord::Base #:nodoc:
  selectable
end

class Ticket < ActiveRecord::Base #:nodoc:

end

RSpec.configure do |config|
  config.around do |example|
    ActiveRecord::Base.transaction do
      example.run
      raise ActiveRecord::Rollback
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
selections-0.1.11 spec/spec_helper.rb
selections-0.1.7 spec/spec_helper.rb
selections-0.1.6 spec/spec_helper.rb
selections-0.1.5 spec/spec_helper.rb
selections-0.1.4 spec/spec_helper.rb
selections-0.1.3 spec/spec_helper.rb
selections-0.1.2 spec/spec_helper.rb
selections-0.1.1 spec/spec_helper.rb