Sha256: 168036b496e01664fab7cebf42f4b83beef312d8b1d7107583b7ac8a321561c1

Contents?: true

Size: 608 Bytes

Versions: 5

Compression:

Stored size: 608 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

Bundler.require(:default)

require 'supermodel' # shouldn't Bundler do this already?
require 'active_support/all'
require 'matchers'
require 'cancan/matchers'

RSpec.configure do |config|
  config.mock_with :rr
  config.before(:each) do
    Project.delete_all
    Category.delete_all
  end
end

class Ability
  include CanCan::Ability

  def initialize(user)
  end
end

class Category < SuperModel::Base
  has_many :projects
end

class Project < SuperModel::Base
  belongs_to :category
  attr_accessor :category # why doesn't SuperModel do this automatically?
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cancan-1.6.5 spec/spec_helper.rb
cancan-1.6.4 spec/spec_helper.rb
cancan-1.6.3 spec/spec_helper.rb
cancan-1.6.2 spec/spec_helper.rb
cancan-1.6.1 spec/spec_helper.rb