aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/model_attribute_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/model_attribute_spec.rb')
-rw-r--r--spec/lib/model_attribute_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/model_attribute_spec.rb b/spec/lib/model_attribute_spec.rb
index da767cfed..ad1dd863f 100644
--- a/spec/lib/model_attribute_spec.rb
+++ b/spec/lib/model_attribute_spec.rb
@@ -13,4 +13,12 @@ RSpec.describe ModelAttribute do
expect(model_attr.data_type).to eq(:string)
end
end
+
+ describe "#code" do
+ it "returns a string representation of the attribute" do
+ model_attr = ModelAttribute.new(:route, :name, :string)
+
+ expect(model_attr.code).to eq('route#name')
+ end
+ end
end