composable_operations 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed2f5934b48ba2d9abb23788f79669d962491781
|
4
|
+
data.tar.gz: 5a8eb0c65e82b61fd3224050d71c7f7ffa937257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e770c5c3058e3e7936a8ed325fd3501614d88d6415379bd375dfc1d26b0d8b1efa99a0dad28d0d2b990b3ffa74aff4a2764db81b90dbcf9d6370ab878b6350ec
|
7
|
+
data.tar.gz: 551575ffb3d2a35214b9d3250f8498a65cb8983bbfdbfd3bbfd91874b1e79c30e9083fe6c8e4b6de0e40897b5b19e14880e83bdf4bbe64bccf58279082aab266
|
@@ -43,7 +43,7 @@ module ComposableOperations
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def exception
|
46
|
-
|
46
|
+
OperationError
|
47
47
|
end
|
48
48
|
|
49
49
|
protected
|
@@ -70,7 +70,7 @@ module ComposableOperations
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def raises(exception)
|
73
|
-
|
73
|
+
define_singleton_method(:exception) { exception }
|
74
74
|
end
|
75
75
|
|
76
76
|
private
|
@@ -87,6 +87,17 @@ describe ComposableOperations::Operation, "that always fails:" do
|
|
87
87
|
failing_operation_with_custom_default_exception_instance.exception.message.should be == 'Operation failed'
|
88
88
|
end
|
89
89
|
end
|
90
|
+
|
91
|
+
context "when subclassed" do
|
92
|
+
subject(:failing_operation_with_custom_default_exception_subclass) do
|
93
|
+
Class.new(failing_operation_with_custom_default_exception)
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should raise the custom exception when executed" do
|
97
|
+
expect { failing_operation_with_custom_default_exception_subclass.perform }.
|
98
|
+
to raise_error(custom_exception, "Operation failed")
|
99
|
+
end
|
100
|
+
end
|
90
101
|
end
|
91
102
|
|
92
103
|
context "When a custom exception has been specified" do
|