query_diet 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/query_diet/logger.rb +3 -1
- data/lib/query_diet/version.rb +1 -1
- data/spec/shared/query_diet/logger_spec.rb +17 -0
- metadata +3 -3
data/lib/query_diet/logger.rb
CHANGED
data/lib/query_diet/version.rb
CHANGED
@@ -51,6 +51,10 @@ describe QueryDiet::Logger do
|
|
51
51
|
|
52
52
|
describe "#paused" do
|
53
53
|
|
54
|
+
after :each do
|
55
|
+
QueryDiet::Logger.paused = false
|
56
|
+
end
|
57
|
+
|
54
58
|
it "should be false by default" do
|
55
59
|
QueryDiet::Logger.paused.should be_false
|
56
60
|
end
|
@@ -69,6 +73,19 @@ describe QueryDiet::Logger do
|
|
69
73
|
QueryDiet::Logger.count.should == 3
|
70
74
|
end
|
71
75
|
|
76
|
+
# regression
|
77
|
+
it "should still execute queries if paused" do
|
78
|
+
Movie.delete_all
|
79
|
+
QueryDiet::Logger.paused = true
|
80
|
+
Movie.count.should == 0
|
81
|
+
Movie.create
|
82
|
+
Movie.count.should == 1
|
83
|
+
end
|
84
|
+
|
85
|
+
it "should be false by default" do
|
86
|
+
QueryDiet::Logger.paused.should be_false
|
87
|
+
end
|
88
|
+
|
72
89
|
end
|
73
90
|
|
74
91
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_diet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 1
|
10
|
+
version: 0.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Henning Koch
|