spec/model/introspection_spec.rb in her-0.6.8 vs spec/model/introspection_spec.rb in her-0.7
- old
+ new
@@ -38,9 +38,14 @@
@user.instance_eval {def password; 'filtered'; end}
@user.inspect.should include("name=\"Tobias Funke\"")
@user.inspect.should include("password=\"filtered\"")
@user.inspect.should_not include("password=\"Funke\"")
end
+
+ it "support dash on attribute" do
+ @user = Foo::User.new(:'life-span' => "3 years")
+ @user.inspect.should include("life-span=\"3 years\"")
+ end
end
describe "#inspect with errors in resource path" do
it "prints the resource path as “unknown”" do
@comment = Foo::Comment.where(:project_id => 1).first