Sha256: c98c95dcaf830153fad7ea23ea87b7eae5f8f907513feb0ff468e9f1d15d81d3
Contents?: true
Size: 874 Bytes
Versions: 1
Compression:
Stored size: 874 Bytes
Contents
RSpec.describe Rambo::RamlModels::Resource do let(:raml_file) { File.expand_path("../../../support/foobar.raml", __FILE__) } let(:raml) { Raml::Parser.parse_file(raml_file) } let(:resource) { raml.resources.first } subject { described_class.new(resource) } describe "#to_s" do it "returns the URI partial" do expect(subject.to_s).to eql resource.uri_partial end end describe "#uri_partial" do it "returns the URI partial" do expect(subject.uri_partial).to eql resource.uri_partial end end describe "#http_methods" do it "returns the correct methods" do expect(subject.http_methods.count).to eql 1 end it "returns an array of Method objects" do all_are_methods = subject.http_methods.all? {|method| method.is_a?(Rambo::RamlModels::Method) } expect(all_are_methods).to be true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rambo_ruby-0.1.0 | spec/lib/raml_models/resource_spec.rb |