spec/integration/mongoid/i18n_spec.rb in mongoid_i18n-0.1.8 vs spec/integration/mongoid/i18n_spec.rb in mongoid_i18n-0.2.0
- old
+ new
@@ -4,11 +4,10 @@
class Entry
include Mongoid::Document
include Mongoid::I18n
localized_field :title
- field :published, :type => Boolean
end
describe Mongoid::I18n, "localized_field" do
before do
I18n.locale = :en
@@ -129,13 +128,9 @@
localized_field :title
embedded_in :entry, :inverse_of => :sub_entries
end
@entry = Entry.new
@sub_entries = (0..2).map { @entry.sub_entries.build }
- end
-
- it "should return a LocalizedCriteria" do
- @entry.sub_entries.criteria.should be_a(Mongoid::I18n::LocalizedCriteria)
end
it "should contain the embedded documents" do
@entry.sub_entries.criteria.instance_variable_get("@documents").should == @sub_entries
end
\ No newline at end of file