# frozen_string_literal: true #-- # gravaty # rubocop:disable Style/AsciiComments # © 2013 Marco Bresciani # rubocop:enable Style/AsciiComments # # This file is part of gravaty. # # gravaty is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # gravaty is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with gravaty. If not, see . # # SPDX-FileCopyrightText: 2013 Marco Bresciani # # SPDX-License-Identifier: GPL-3.0-or-later #++ require_relative '../../test_helper' describe Gravaty::Gravaty do describe 'when using a parser' do include Gravaty::ParsableDuckType before do @parser = subject end subject { Gravaty::Parsers::Force.new } [['f=y', true], ['', false]].each do |pair| it "shall return '#{pair[0]}' when parameter is '#{pair[1]}'" do _(subject.parse(pair[1])).must_equal pair[0] end end end end