Module: Seatbelt::AssertJson
- Included in:
- Minitest::Test, Minitest::Unit::TestCase, Test::Unit::TestCase
- Defined in:
- lib/seatbelt/assert_json.rb
Defined Under Namespace
Classes: Json
Instance Method Summary collapse
- #assert_json(json_string, &block) ⇒ Object
- #has(*args, &block) ⇒ Object
- #has_not(*args, &block) ⇒ Object
Instance Method Details
#assert_json(json_string, &block) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/seatbelt/assert_json.rb', line 5 def assert_json(json_string, &block) if block_given? @json = AssertJson::Json.new(json_string) # json.instance_exec(json, &block) yield @json end end |
#has(*args, &block) ⇒ Object
13 14 15 |
# File 'lib/seatbelt/assert_json.rb', line 13 def has(*args, &block) @json.has(*args, &block) end |
#has_not(*args, &block) ⇒ Object
17 18 19 |
# File 'lib/seatbelt/assert_json.rb', line 17 def has_not(*args, &block) @json.has_not(*args, &block) end |