aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/algebra/unit/primitives/value_spec.rb
blob: 45208e6c5df035ae624fc71897d1ece7262022a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'spec_helper')

module Arel
  describe Value do
    before do
      @relation = Table.new(:users)
    end

    describe '#bind' do
      it "manufactures a new value whose relation is the provided relation" do
        Value.new(1, @relation).bind(another_relation = Table.new(:photos)).should == Value.new(1, another_relation)
      end
    end
  end
end