fossil 0.3.14 → 0.3.15
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/fossil.gemspec +1 -1
- data/spec/be_model_with_values_matcher.rb +1 -1
- data/spec/be_model_with_values_matcher_spec.rb +5 -0
- data/spec/models/code_spec.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.15
|
data/fossil.gemspec
CHANGED
@@ -3,7 +3,7 @@ module BeModelWithValuesMatcher
|
|
3
3
|
class BeModelWithValues
|
4
4
|
def initialize(expected_hash, compare_as_strings=false)
|
5
5
|
@compare_as_strings = compare_as_strings
|
6
|
-
@expected_hash = expected_hash
|
6
|
+
@expected_hash = expected_hash.stringify_keys!
|
7
7
|
end
|
8
8
|
|
9
9
|
def matches?(model)
|
@@ -9,6 +9,11 @@ describe "spec matchers" do
|
|
9
9
|
dude.should be_model_with_values( {:kid_date=>1, :kid_time=>2} )
|
10
10
|
end
|
11
11
|
|
12
|
+
it "should match a models values if they are all in the expected hash even if values hash has symbol keys" do
|
13
|
+
dude = MockModel.new({:kid_date=>1, :kid_time=>2})
|
14
|
+
dude.should be_model_with_values( {'kid_date'=>1, 'kid_time'=>2} )
|
15
|
+
end
|
16
|
+
|
12
17
|
it "should match (as strings) a models values if they are all in the expected hash" do
|
13
18
|
dude = MockModel.new({:kid_date=>"1", :kid_time=>"2"})
|
14
19
|
dude.should be_model_with_values_as_strings( {:kid_date=>1, :kid_time=>2} )
|
data/spec/models/code_spec.rb
CHANGED