sugarcube 0.20.19 → 0.20.20

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sugarcube (0.20.19)
4
+ sugarcube (0.20.20)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  class NSNotification
2
2
 
3
3
  def [](key)
4
- userInfo[key]
4
+ userInfo && userInfo[key]
5
5
  end
6
6
 
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.20.19'
2
+ Version = '0.20.20'
3
3
  end
@@ -47,12 +47,22 @@ describe "Notifications" do
47
47
  @notification_tester_object.object.should == @object
48
48
  end
49
49
 
50
- it "should send userInfo" do
51
- @notification.post_notification(@object, key: :value)
52
- @notification_tester_object.notified?.should == true
53
- @notification_tester_object.notification.should != nil
54
- @notification_tester_object.object.should == @object
55
- @notification_tester_object.notification[:key].should == :value
50
+ describe "should send userInfo" do
51
+ it 'should return values' do
52
+ @notification.post_notification(@object, key: :value)
53
+ @notification_tester_object.notified?.should == true
54
+ @notification_tester_object.notification.should != nil
55
+ @notification_tester_object.object.should == @object
56
+ @notification_tester_object.notification[:key].should == :value
57
+ end
58
+
59
+ it "should return nil if userInfo wasn't sent" do
60
+ @notification.post_notification(@object)
61
+ @notification_tester_object.notified?.should == true
62
+ @notification_tester_object.notification.should != nil
63
+ @notification_tester_object.object.should == @object
64
+ @notification_tester_object.notification[:key].should == nil
65
+ end
56
66
  end
57
67
 
58
68
  after do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.19
4
+ version: 0.20.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: