more rspec
This commit is contained in:
@@ -129,6 +129,16 @@ RSpec.describe HasAuxTable do
|
||||
expect(Vehicle.count).to eq(0)
|
||||
end
|
||||
|
||||
describe "column reporting" do
|
||||
it "reports the correct columns on the string repr of the class" do
|
||||
expect(Car.inspect).to include("fuel_type")
|
||||
end
|
||||
|
||||
it "does not include the aux table foreign key" do
|
||||
expect(Car.inspect).not_to include("base_table_id")
|
||||
end
|
||||
end
|
||||
|
||||
describe "database integration" do
|
||||
it "provides automatic attribute accessors for auxiliary table columns" do
|
||||
vehicle = Car.create!(name: "Honda Civic")
|
||||
|
||||
Reference in New Issue
Block a user