Sha256: f4d57ce54aaec5d32ba22677f84eeeab2f4574f82f2909a15ab60e7bd900b515
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
# frozen_string_literal: true require "spec_helper" RSpec.describe RSpec::Grape::Entity::Matchers::IncludeDocumentationMatcher do include RSpec::Grape::Entity::Matchers::IncludeDocumentationMatcher let(:entity) { TestEntity } context "when has documentation" do subject(:exposure) { entity.find_exposure :id } it { is_expected.to include_documentation type: Integer, desc: "The record id" } it { is_expected.to include_documentation type: Integer } it { is_expected.to include_documentation desc: "The record id" } it { is_expected.to include_documentation :type, :desc } it { is_expected.to include_documentation :desc } it { is_expected.to include_documentation :type } end context "when does not have documentation" do subject(:exposure) { entity.find_exposure :permissions } it { is_expected.not_to include_documentation type: Integer, desc: "Permissions" } it { is_expected.not_to include_documentation type: Integer } it { is_expected.not_to include_documentation desc: "The record id" } it { is_expected.not_to include_documentation :type, :desc } it { is_expected.not_to include_documentation :desc } it { is_expected.not_to include_documentation :type } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-grape-entity-0.1.0 | spec/matchers/include_documentation_matcher_spec.rb |