File: without_serializer.rb

package info (click to toggle)
ruby-snaky-hash 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,156 kB
  • sloc: ruby: 1,298; javascript: 529; makefile: 4; sh: 4
file content (14 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# A shared context that creates a hash class without serialization capabilities
#
# @example Using the shared context
#   RSpec.describe MyClass do
#     include_context "without serializer"
#     # ... rest of the spec
#   end
RSpec.shared_context "without serializer" do
  subject(:hash_klass) do
    Class.new(Hashie::Mash) do
      include SnakyHash::Snake.new(key_type: :string, serializer: false)
    end
  end
end