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