solid_assert 0.6.0 → 0.7.0
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/README.md +1 -3
- data/VERSION +1 -1
- data/lib/solid_assert/solid_assert.rb +2 -7
- data/solid_assert.gemspec +1 -1
- data/spec/solid_assert/assert_spec.rb +1 -5
- data/spec/solid_assert/null_assert_spec.rb +3 -6
- data/spec/solid_assert/solid_assert_spec.rb +0 -18
- metadata +3 -3
data/README.md
CHANGED
@@ -24,9 +24,7 @@ You can enable assertions with
|
|
24
24
|
|
25
25
|
SolidAssert.enable_assertions
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
SolidAssert.disable_assertions
|
27
|
+
Assertions are disabled by default.
|
30
28
|
|
31
29
|
Use `assert` for testing conditions. You can optionally provide a message
|
32
30
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.0
|
@@ -1,5 +1,4 @@
|
|
1
1
|
module SolidAssert
|
2
|
-
|
3
2
|
# Turns the assertions on
|
4
3
|
def self.enable_assertions
|
5
4
|
Object.class_eval do
|
@@ -7,13 +6,9 @@ module SolidAssert
|
|
7
6
|
end
|
8
7
|
end
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
Object.class_eval do
|
13
|
-
include NullAssert
|
14
|
-
end
|
9
|
+
Object.class_eval do
|
10
|
+
include NullAssert
|
15
11
|
end
|
16
|
-
|
17
12
|
end
|
18
13
|
|
19
14
|
|
data/solid_assert.gemspec
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe SolidAssert::NullAssert do
|
4
|
-
|
5
|
-
Object.class_eval do
|
6
|
-
include SolidAssert::NullAssert
|
7
|
-
end
|
8
|
-
end
|
4
|
+
include SolidAssert::NullAssert
|
9
5
|
|
10
6
|
describe "#assert" do
|
11
7
|
it "should do nothing without message" do
|
@@ -31,4 +27,5 @@ describe SolidAssert::NullAssert do
|
|
31
27
|
end
|
32
28
|
end
|
33
29
|
|
34
|
-
end
|
30
|
+
end
|
31
|
+
|
@@ -13,23 +13,5 @@ describe SolidAssert::Assert do
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
describe ".disable_assertions" do
|
17
|
-
it "should make the Object class to include the EmptyAssertions module" do
|
18
|
-
Object.should_receive(:include).with(SolidAssert::NullAssert)
|
19
|
-
SolidAssert.disable_assertions
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should enable blank assertions, when these have been enabled previously" do
|
23
|
-
SolidAssert.disable_assertions
|
24
|
-
lambda{assert false}.should_not raise_error(SolidAssert::AssertionFailedError)
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should disabled assertions, if these have been enabled previously" do
|
28
|
-
SolidAssert.enable_assertions
|
29
|
-
SolidAssert.disable_assertions
|
30
|
-
lambda{assert false}.should_not raise_error(SolidAssert::AssertionFailedError)
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
16
|
end
|
35
17
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solid_assert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 7
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.7.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jorge Manrubia
|