make_watchable 0.0.2 → 0.0.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.
@@ -1,3 +1,3 @@
1
1
  module MakeWatchable
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -70,6 +70,8 @@ module MakeWatchable
70
70
 
71
71
  # Check if the watcher watches a watchable.
72
72
  def watches?(watchable)
73
+ check_watchable(watchable)
74
+
73
75
  fetch_watching(watchable) ? true : false
74
76
  end
75
77
 
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.add_development_dependency "database_cleaner", "0.6.7.RC"
21
21
  s.add_development_dependency "sqlite3-ruby", "~> 1.3.0"
22
22
  s.add_development_dependency "generator_spec", "~> 0.8.2"
23
+ s.add_development_dependency "rake", "0.8.7"
23
24
 
24
25
  s.files = `git ls-files`.split("\n")
25
26
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
@@ -16,6 +16,12 @@ describe "Make Watchable" do
16
16
  @watcher.class.watcher?.should == true
17
17
  end
18
18
 
19
+ it "should have watchings" do
20
+ @watcher.watchings.length.should == 0
21
+ @watcher.watch!(@watchable)
22
+ @watcher.watchings.reload.length.should == 1
23
+ end
24
+
19
25
  describe "watcher" do
20
26
  describe "watch" do
21
27
  it "should create a watching" do
@@ -63,12 +69,14 @@ describe "Make Watchable" do
63
69
  end
64
70
  end
65
71
 
66
- it "should check if watcher is watches the watchable" do
67
- @watcher.watches?(@watchable).should == false
68
- @watcher.watch!(@watchable)
69
- @watcher.watches?(@watchable).should == true
70
- @watcher.unwatch!(@watchable)
71
- @watcher.watches?(@watchable).should == false
72
+ describe "watches?" do
73
+ it "should check if watcher is watches the watchable" do
74
+ @watcher.watches?(@watchable).should == false
75
+ @watcher.watch!(@watchable)
76
+ @watcher.watches?(@watchable).should == true
77
+ @watcher.unwatch!(@watchable)
78
+ @watcher.watches?(@watchable).should == false
79
+ end
72
80
  end
73
81
  end
74
82
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: make_watchable
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kai Schlamp
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-18 00:00:00 +02:00
13
+ date: 2011-06-19 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -79,6 +79,17 @@ dependencies:
79
79
  version: 0.8.2
80
80
  type: :development
81
81
  version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: rake
84
+ prerelease: false
85
+ requirement: &id007 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - "="
89
+ - !ruby/object:Gem::Version
90
+ version: 0.8.7
91
+ type: :development
92
+ version_requirements: *id007
82
93
  description: A user-centric watching extension for Rails 3 applications.
83
94
  email:
84
95
  - schlamp@gmx.de