spec/endpoint_spec.rb in wordnik-4.06.05 vs spec/endpoint_spec.rb in wordnik-4.06.06

- old
+ new

@@ -1,20 +1,17 @@ require 'spec_helper' describe Wordnik::Endpoint do before(:each) do - VCR.use_cassette('words', :record => :new_episodes) do - @response = Typhoeus::Request.get("http://beta.wordnik.com/v4/word.json") - end - @resource = Wordnik::Resource.new(:name => "word", :raw_data => JSON.parse(@response.body)) + @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}" + @endpoint.path.should =~ /word\.{format}\/{word}/i end it "sets operations" do @endpoint.operations.class.should == Array @endpoint.operations.first.class.should == Wordnik::Operation \ No newline at end of file