Sha256: 9976a23ac005c18e3e3e610e2808f6a247dfdf0b39719fccdf253da16261b527

Contents?: true

Size: 750 Bytes

Versions: 27

Compression:

Stored size: 750 Bytes

Contents

require 'spec_helper'

describe Scorpion::Rails::ActiveRecord::Association, type: :model do
  include Scorpion::Rspec::Helper

  before( :each ) do
    author = Author.create! name: "Pitbull"
    todo   = Todo.create! name: "Be even more awesome", author: author
  end

  it "shares scorpion with associations" do
    author = Author.with_scorpion( scorpion ).first
    expect( author.todos.scorpion ).to be scorpion
  end

  it "shares scorpion with association results" do
    author = Author.with_scorpion( scorpion ).first
    expect( author.todos.first.scorpion ).to be scorpion
  end

  it "shares scorpion with single associations" do
    todo = Todo.with_scorpion( scorpion ).first
    expect( todo.author.scorpion ).to be scorpion
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
scorpion-ioc-0.6.2 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.6.1 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.6.0 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.23 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.22 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.21 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.20 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.19 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.18 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.17 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.16 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.15 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.14 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.13 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.12 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.11 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.10 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.9 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.8 spec/lib/scorpion/rails/active_record/association_spec.rb
scorpion-ioc-0.5.7 spec/lib/scorpion/rails/active_record/association_spec.rb