Sha256: cadbbf111a426112f26571d6be659a148217f207f126d196d290bf0607596298

Contents?: true

Size: 523 Bytes

Versions: 15

Compression:

Stored size: 523 Bytes

Contents

require 'spec_helper'

describe Wordnik::Endpoint do

  before(:each) do
    @resource = Wordnik::Resource.new(:name => "word", :raw_data => JSON.parse(sample_resource_body))
    @endpoint = @resource.endpoints.first
  end

  describe "initialization" do

    it "successfully initializes" do
      @endpoint.path.should =~ /word\.{format}\/{word}/i
    end

    it "sets operations" do
      @endpoint.operations.class.should == Array
      @endpoint.operations.first.class.should == Wordnik::Operation
    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
wordnik-4.12 spec/endpoint_spec.rb
wordnik-4.11 spec/endpoint_spec.rb
wordnik-4.10 spec/endpoint_spec.rb
wordnik-4.09 spec/endpoint_spec.rb
wordnik-4.08 spec/endpoint_spec.rb
wordnik-4.07 spec/endpoint_spec.rb
wordnik-4.06.15 spec/endpoint_spec.rb
wordnik-4.06.14 spec/endpoint_spec.rb
wordnik-4.06.13 spec/endpoint_spec.rb
wordnik-4.06.12 spec/endpoint_spec.rb
wordnik-4.06.11 spec/endpoint_spec.rb
wordnik-4.06.10 spec/endpoint_spec.rb
wordnik-4.06.08 spec/endpoint_spec.rb
wordnik-4.06.07 spec/endpoint_spec.rb
wordnik-4.06.06 spec/endpoint_spec.rb