Sha256: 7d88a28e95fab1e2b3d9be04717c2fcce3e4645ce9bc96d377a0e402c089545c
Contents?: true
Size: 794 Bytes
Versions: 23
Compression:
Stored size: 794 Bytes
Contents
require 'spec_helper' describe "ActiveRecord::FinderMethods" do before(:all) do reload_turntable!(File.join(File.dirname(__FILE__), "../../config/turntable.yml")) end context "User insert with id" do before do establish_connection_to(:test) truncate_shard user end let(:user) { u = User.new u.id = 1 u.save u } describe "User#find" do context "With existing users.id" do subject { User.find(1) } it "#find should be returns user" do is_expected.to eq(user) end end context "With users.id not existing" do subject { User.find(2) } it "#find should raise error" do expect { subject }.to raise_error end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems