nano-store 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,10 @@ module NanoStore
4
4
  alias_method :saved, :savedObjects
5
5
  alias_method :unsaved, :unsavedObjects
6
6
  alias_method :removed, :removedObjects
7
+
8
+ def originalClassString
9
+ 'NSFNanoBag'
10
+ end
7
11
 
8
12
  def changed?
9
13
  self.hasUnsavedChanges
@@ -1,3 +1,3 @@
1
1
  module NanoStore
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
data/spec/bag_spec.rb CHANGED
@@ -63,4 +63,19 @@ describe NanoStore::Bag do
63
63
  bag.saved.count.should.be == 1
64
64
  end
65
65
 
66
+ it "should add bag to store" do
67
+ before_count = NanoStore.shared_store.bags.count
68
+
69
+ bag = Bag.bag
70
+ NanoStore.shared_store.addObject(bag, error:nil)
71
+
72
+ # use << method to add object to bag
73
+ page = Page.new
74
+ page.text = "Hello"
75
+ page.index = 1
76
+ bag << page
77
+
78
+ bag.save
79
+ NanoStore.shared_store.bags.count.should.be == before_count + 1
80
+ end
66
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nano-store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: