itrigga-param_fu 0.1.1 → 0.1.2
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/VERSION +1 -1
- data/lib/trigga/param_fu/param_fu.rb +1 -1
- data/spec/param_fu_spec.rb +10 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/spec/param_fu_spec.rb
CHANGED
@@ -123,6 +123,16 @@ describe ::Trigga::ParamFu do
|
|
123
123
|
it "should include the given value in values, wrapped in wildcard markers" do
|
124
124
|
Tester.id_or_name_condition('mymodel', 'string_value')[:values].should == '%string_value%'
|
125
125
|
end
|
126
|
+
|
127
|
+
context "and the value has an id in brackets on the end" do
|
128
|
+
it "should strip the brackets and value" do
|
129
|
+
Tester.id_or_name_condition('mymodel', 'string_value (1234)')[:values].should_not =~ /\([0-9]*\)/
|
130
|
+
end
|
131
|
+
|
132
|
+
it "should strip any space before the brackets" do
|
133
|
+
Tester.id_or_name_condition('mymodel', 'string_value (1234)')[:values].should == "%string_value%"
|
134
|
+
end
|
135
|
+
end
|
126
136
|
end
|
127
137
|
context "when given an integer value" do
|
128
138
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itrigga-param_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Al Davidson
|