-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16560 from kbrock/arel_attribute
Handle deprecated classes in arel
- Loading branch information
Showing
3 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
describe DeprecationMixin do | ||
# Host.deprecate_attribute :address, :hostname | ||
context ".arel_attribute" do | ||
it "works for deprecate_attribute columns" do | ||
expect(Host.attribute_supported_by_sql?(:address)).to eq(true) | ||
expect(Host.arel_attribute(:address)).to_not be_nil | ||
expect(Host.arel_attribute(:address).name).to eq("hostname") # typically this is a symbol. not perfect but it works | ||
end | ||
end | ||
end |