Permalink
Browse files

failing spec for nested classes

  • Loading branch information...
1 parent f2055fc commit 90f24a9816248715f82e16759406cea9343885eb @flavorjones flavorjones committed Jul 8, 2009
Showing with 16 additions and 1 deletion.
  1. +16 −1 spec/acts_as_fu_spec.rb
View
@@ -110,6 +110,21 @@ class << Foo; attr_reader :bar end
}.should change(Asset.pictures, :count)
end
end
+
+ describe "nested class" do
+ it "is contained in a class" do
+ class Foo::SubThing; end
+
+ build_model(:sub_things, :contained => Foo) do
+ string :name
+ end
+
+ proc {
+ Foo::SubThing.create :name => "foo"
+ }.should change(Foo::SubThing, :count)
+ end
+ end
+
end
describe "custom DB config" do
@@ -143,4 +158,4 @@ class << Foo; attr_reader :bar end
ActsAsFu::Connection.log.should include("CREATE TABLE")
end
end
-end
+end

0 comments on commit 90f24a9

Please sign in to comment.