aboutsummaryrefslogtreecommitdiffstats
path: root/spec/active_relation/unit/relations/alias_spec.rb
blob: 4a2144db823369dbaf98e66d09c45d1232a478b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper')

module ActiveRelation
  describe Alias do
    before do
      @relation = Table.new(:users)
      @alias_relation = Alias.new(@relation, :foo)
    end
    
    describe '#alias' do
      it "returns the alias" do
        @alias_relation.alias.should == :foo
      end
    end
  end
end