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 CHANGED
@@ -24,9 +24,7 @@ You can enable assertions with
24
24
 
25
25
  SolidAssert.enable_assertions
26
26
 
27
- You can disabled assertions with
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.6.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
- # Turns the assertions off
11
- def self.disable_assertions
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
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{solid_assert}
8
- s.version = "0.6.0"
8
+ s.version = "0.7.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Jorge Manrubia}]
@@ -1,11 +1,7 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe SolidAssert::Assert do
4
- before(:all) do
5
- Object.class_eval do
6
- include SolidAssert::Assert
7
- end
8
- end
4
+ include SolidAssert::Assert
9
5
 
10
6
  describe "#assert" do
11
7
  describe "without assertion message" do
@@ -1,11 +1,7 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe SolidAssert::NullAssert do
4
- before(:all) do
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: 7
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 6
8
+ - 7
9
9
  - 0
10
- version: 0.6.0
10
+ version: 0.7.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jorge Manrubia