Sha256: 8c75c8bb8325308428ad9be15e2f03d3e28603ceff49e7b7fd3963331d4bcf54

Contents?: true

Size: 592 Bytes

Versions: 10

Compression:

Stored size: 592 Bytes

Contents

# coding: utf-8
require 'jp_prefecture'
require "active_record"

RSpec.configure do |config|
  config.before(:suite) do
    setup_db
  end

  config.after(:suite) do
    teardown_db
  end
end

def setup_db
  ActiveRecord::Base.establish_connection :adapter => "sqlite3", :database => ":memory:"

  ActiveRecord::Schema.define(:version => 1) do
    create_table :places do |t|
      t.integer :prefecture_code
      t.integer :prefecture_id
    end
  end
end

def teardown_db
  ActiveRecord::Base.connection.tables.each do |table|
    ActiveRecord::Base.connection.drop_table(table)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jp_prefecture-0.7.0 spec/spec_helper.rb
jp_prefecture-0.6.0 spec/spec_helper.rb
jp_prefecture-0.5.0 spec/spec_helper.rb
jp_prefecture-0.4.0 spec/spec_helper.rb
jp_prefecture-0.3.2 spec/spec_helper.rb
jp_prefecture-0.3.1 spec/spec_helper.rb
jp_prefecture-0.3.0 spec/spec_helper.rb
jp_prefecture-0.2.0 spec/spec_helper.rb
jp_prefecture-0.1.1 spec/spec_helper.rb
jp_prefecture-0.1.0 spec/spec_helper.rb